From 91bb80b6bff9e8c99ed7958f7d399aa5d72916aa Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Thu, 7 Mar 2024 08:34:09 +0100 Subject: [PATCH 1/2] Increment version numbers in CI configuration --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1bda139..0dfe787 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,12 +16,12 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.7] + python-version: ["3.9"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install Fish @@ -42,7 +42,7 @@ jobs: - name: Check for release if: github.ref == 'refs/heads/main' run: | - python -m pip install githubrelease httpx==0.16.1 autopub + python -m pip install githubrelease httpx==0.18.2 autopub echo "##[set-output name=release;]$(autopub check)" id: check_release - name: Deploy From b4a4510b21182607972c76d239cdc2fa1e76ec8a Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Thu, 7 Mar 2024 08:39:34 +0100 Subject: [PATCH 2/2] Handle invisible characters when checking Fish version Previous behavior seems to have caused an error when, for example, a Fish configuration file contained tab characters. --- RELEASE.md | 3 +++ virtualfish/loader/cli.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 RELEASE.md 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]