Skip to content

Commit

Permalink
Quote filepaths in load()
Browse files Browse the repository at this point in the history
Closes #252
  • Loading branch information
cthoyt authored Nov 26, 2024
1 parent 0cff4b8 commit 8ebc4e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions virtualfish/loader/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ def load(plugins=(), full_install=True):

if full_install:
commands += [
f"set -g VIRTUALFISH_PYTHON_EXEC {sys.executable}",
"source {}".format(os.path.join(base_path, "virtual.fish")),
f"set -g VIRTUALFISH_PYTHON_EXEC \"{sys.executable}\"",
"source \"{}\"".format(os.path.join(base_path, "virtual.fish")),
]
else:
commands = []

for plugin in plugins:
path = os.path.join(base_path, plugin + ".fish")
if os.path.exists(path):
commands.append(f"source {path}")
commands.append(f"source \"{path}\"")
else:
log.error(f"Plugin does not exist: {plugin}")
sys.exit(1)
Expand Down

0 comments on commit 8ebc4e4

Please sign in to comment.