Fix/test old bash (#216)

* test(old-bash): use tmux instead of mocking it

* quote output
This commit is contained in:
vdbe 2024-05-12 16:34:44 +00:00 committed by GitHub
parent c056412238
commit 697087f593
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 7 deletions

View file

@ -59,7 +59,7 @@ main() {
exit 1 exit 1
else else
echo "Running plugin: $plugin" >&2 echo "Running plugin: $plugin" >&2
output=$(tmux run-shell "$plugin" 2>&1) output="$(tmux run-shell "$plugin" 2>&1)"
exit_code="$?" exit_code="$?"
check "$exit_code" "$output" check "$exit_code" "$output"

View file

@ -38,16 +38,14 @@ jobs:
name: "Old Bash" name: "Old Bash"
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: bash:3.2.57 # Bash version used by macos image: bash:3.2.57-alpine3.19 # Bash version used by macos
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Check Syntax is Valid - name: Check Syntax is Valid
shell: bash shell: bash
run: | run: |
# No tmux available in this container apk update
tmp="$(mktemp -d)" apk add tmux
touch "$tmp/tmux"
chmod +x "$tmp/tmux"
export PATH="$tmp:$PATH"
bash --version bash --version
tmux -V
./.github/scripts/test.bash ./catppuccin.tmux ./.github/scripts/test.bash ./catppuccin.tmux