diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000..b8278ad --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,3 @@ +Release type: patch + +Improve resiliency of `check_fish_version()` function to invisible characters such as tabs. diff --git a/virtualfish/loader/cli.py b/virtualfish/loader/cli.py index d292ff2..5582c04 100644 --- a/virtualfish/loader/cli.py +++ b/virtualfish/loader/cli.py @@ -28,7 +28,7 @@ def check_fish_version(): import subprocess from packaging import version - cmd = ["fish", "-c", "echo $version"] + cmd = ["fish", "-N", "-c", "echo $version"] fish_version = subprocess.check_output(cmd).decode("utf-8").strip() # Remove any extraneous hyphen-suffixed bits fish_version = fish_version.partition("-")[0]