Skip to content

Commit

Permalink
install.sh: Print more informative error if created file is empty (#447)
Browse files Browse the repository at this point in the history
Mitigation for #446
  • Loading branch information
traversaro committed Nov 11, 2023
1 parent 675893c commit 7050ea2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions install/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ if [[ ${HTTP_CODE} -lt 200 || ${HTTP_CODE} -gt 299 ]]; then
exit 1
fi

# Check that file was correctly created (https://github.com/prefix-dev/pixi/issues/446)
if [[ ! -s $TEMP_FILE ]]; then
echo "error: temporary file ${TEMP_FILE} not correctly created."
echo " As a workaround, you can try set TMPDIR env variable to directory with write permissions."
exit 1
fi

# Extract pixi from the downloaded tar file
mkdir -p "$INSTALL_DIR"
tar -xzf "$TEMP_FILE" -C "$INSTALL_DIR"
Expand Down

0 comments on commit 7050ea2

Please sign in to comment.