diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 159e994..7360d45 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,6 +25,9 @@ jobs: fi shellcheck -S error bin/gh-switch lib/*.sh + - name: Make install.sh executable + run: chmod +x install.sh + - name: Test installation run: | ./install.sh diff --git a/install.sh b/install.sh index 74edfd2..2eb897f 100644 --- a/install.sh +++ b/install.sh @@ -72,7 +72,11 @@ else fi # Optional: Install shell completions -read -p "Install shell completions? (y/n): " install_completions +if [[ -n "$CI" ]]; then + install_completions="n" +else + read -p "Install shell completions? (y/n): " install_completions +fi if [[ "$install_completions" == "y" ]]; then if [[ -f "completions/gh-switch.bash" ]] && [[ -d "/etc/bash_completion.d" ]]; then sudo cp completions/gh-switch.bash /etc/bash_completion.d/