Skip to content

Update install-macos.sh - #89

Open
maumeerally wants to merge 1 commit into
VantaInc:mainfrom
maumeerally:main
Open

Update install-macos.sh#89
maumeerally wants to merge 1 commit into
VantaInc:mainfrom
maumeerally:main

Conversation

@maumeerally

Copy link
Copy Markdown

Added defensive double-quoting around variable references throughout the script. This follows ShellCheck best practices to prevent word-splitting, unexpected glob expansion, and syntax errors if file paths, URLs, or command outputs contain spaces or special characters.

Specific changes made:

File Path Quoting ($PKG_PATH): Enclosed $PKG_PATH in double quotes ("$PKG_PATH") across all file operation commands (rm, curl, shasum, pkgutil, and installer).

URL Quoting ($PKG_URL): Wrapped "$PKG_URL" in double quotes in the curl download step.

Safe Variable Comparison: Updated the checksum equality test from if [ $downloaded_checksum = $CHECKSUM ] to if [ "$downloaded_checksum" = "$CHECKSUM" ]. This prevents bash [: too many arguments syntax crashes if $downloaded_checksum evaluates to empty or contains whitespace.

@maumeerally

Copy link
Copy Markdown
Author

@SW386 Bringing this pull request to your attention

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant