From 1a95da282265961623641924e18c07b35eb94fae Mon Sep 17 00:00:00 2001 From: ramchandarkg Date: Sat, 11 Oct 2025 21:24:35 +0530 Subject: [PATCH 1/2] Fixing Permission denied Issue in Github Workflow --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) 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 From f740014e35e73aeeae65491790890e889c9939ee Mon Sep 17 00:00:00 2001 From: ramchandarkg Date: Sat, 11 Oct 2025 21:56:56 +0530 Subject: [PATCH 2/2] In a non-interactive environment (like GitHub Actions), read -p will fail with an error or hang, causing the script to exit with a non-zero status --- install.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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/