Skip to content

Commit 325e915

Browse files
authored
fix(action): make install script shellcheck compatible (#36)
The inline shell script for installing the Gemini CLI has been updated to be more robust and adhere to best practices.
1 parent f78661b commit 325e915

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

action.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,14 @@ runs:
8585
8686
VERSION_INPUT="${GEMINI_CLI_VERSION:-latest}"
8787
88-
if [[ "$VERSION_INPUT" == "latest" || "$VERSION_INPUT" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9\.-]+)?(\+[a-zA-Z0-9\.-]+)?$ ]]; then
89-
echo "Installing Gemini CLI from npm: @google/gemini-cli@$VERSION_INPUT"
90-
npm install -g @google/gemini-cli@$VERSION_INPUT
88+
if [[ "${VERSION_INPUT}" == "latest" || "${VERSION_INPUT}" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9\.-]+)?(\+[a-zA-Z0-9\.-]+)?$ ]]; then
89+
echo "Installing Gemini CLI from npm: @google/gemini-cli@${VERSION_INPUT}"
90+
npm install -g @google/gemini-cli@"${VERSION_INPUT}"
9191
else
92-
echo "Installing Gemini CLI from GitHub: github:google-gemini/gemini-cli#$VERSION_INPUT"
92+
echo "Installing Gemini CLI from GitHub: github:google-gemini/gemini-cli#${VERSION_INPUT}"
9393
git clone https://github.com/google-gemini/gemini-cli.git
9494
cd gemini-cli
95-
git checkout $VERSION_INPUT
95+
git checkout "${VERSION_INPUT}"
9696
npm install
9797
npm run bundle
9898
npm install -g .

0 commit comments

Comments
 (0)