From 8ebc4e43e4be1442536cd4218d8a156552edbc42 Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Tue, 26 Nov 2024 18:12:33 +0100 Subject: [PATCH] Quote filepaths in load() Closes #252 --- virtualfish/loader/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/virtualfish/loader/__init__.py b/virtualfish/loader/__init__.py index 3f86dc0..5c81ab3 100644 --- a/virtualfish/loader/__init__.py +++ b/virtualfish/loader/__init__.py @@ -16,8 +16,8 @@ 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 = [] @@ -25,7 +25,7 @@ def load(plugins=(), full_install=True): 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)