Skip to content

Commit

Permalink
Handle invisible characters when checking Fish version
Browse files Browse the repository at this point in the history
Previous behavior seems to have caused an error when, for example,
a Fish configuration file contained tab characters.
  • Loading branch information
justinmayer committed Mar 7, 2024
1 parent 91bb80b commit b4a4510
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Release type: patch

Improve resiliency of `check_fish_version()` function to invisible characters such as tabs.
2 changes: 1 addition & 1 deletion virtualfish/loader/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit b4a4510

Please sign in to comment.