Skip to content

Commit

Permalink
Don’t allow dev to be activate twice
Browse files Browse the repository at this point in the history
Fixes #711
  • Loading branch information
mxcl committed Sep 12, 2023
1 parent 136ab36 commit 73035c5
Showing 1 changed file with 26 additions and 6 deletions.
32 changes: 26 additions & 6 deletions .github/workflows/ci.shellcode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -339,18 +339,14 @@ jobs:
no-shell-output-if-no-tty:
needs: compile
runs-on: ubuntu-latest
container:
image: archlinux:latest # lazygit fails for reasons that are mysterious
options: -t
steps:
- uses: actions/download-artifact@v3
with:
path: /usr/local/bin
name: tea

- name: prep
run: |
chmod u+x /usr/local/bin/tea
run: chmod u+x /usr/local/bin/tea

#TODO ideally we'd test something that uses another tool in tea and
# is poorly written so it reads both stdout and stderr eg `lazygit`
Expand All @@ -361,6 +357,30 @@ jobs:
tea echo 2> >(tee temp_file) >/dev/null
if [[ -s temp_file ]]; then
echo
echo 'tea output logging info when no tty present'
echo 'tea output logging info when no tty present' >&2
exit 1
fi
cannot-multi-dev:
needs: compile
runs-on: ubuntu-latest
steps:
steps:
- uses: actions/download-artifact@v3
with:
path: /usr/local/bin
name: tea
- name: prep
run: chmod u+x /usr/local/bin/tea

- run: touch package.json

- run: |
eval "$(tea --shellcode)
dev
if dev; then
echo 'dev did not fail when already activated' >&2
exit 1
fi

0 comments on commit 73035c5

Please sign in to comment.