Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix invalid extraction directory error in install script #83

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

marcelroed
Copy link

Fixes #82 by adding an mkdir before trying to extract the downloaded zip file.

Copy link

Review changes with  SemanticDiff

@marcelroed marcelroed changed the title Fix invalid extraction directory error Fix invalid extraction directory error in install script Feb 27, 2025
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR fixes an installation script issue by ensuring the extraction directory exists before unzipping the CLI binary.

  • Added mkdir "${TMPDIR}/dist" command in install.sh to create the destination directory before extraction
  • Addresses issue Install script failing on unzip command on MacOS 15.4 #82 where the unzip command was failing with "Invalid extraction directory" error on MacOS 15.4
  • Prevents installation failures that occurred because the unzip command on MacOS requires the destination directory to exist beforehand
  • Simple but critical fix that improves cross-platform compatibility of the installation process

💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!

1 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

@@ -113,6 +113,7 @@ if ! unzip -t "${TMPDIR}/${BINARY_NAME}.zip" >/dev/null 2>&1; then
fi

# Extract the zip file in the temporary directory.
mkdir "${TMPDIR}/dist"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Consider adding error handling to the mkdir command similar to other commands in this script.

Suggested change
mkdir "${TMPDIR}/dist"
mkdir "${TMPDIR}/dist" || { echo "Failed to create extraction directory"; exit 1; }

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.

Install script failing on unzip command on MacOS 15.4
1 participant