Hi! The install script fails on my Mac running MacOS 15.4. It seems like when running unzip, the directory dist is not found:
$ ./install.sh # Also happens with curl ... | sh
Downloading 'sf' CLI binary...
curl -L -o "/var/folders/bd/847y_93d4tl6nwdgxdzs7lgm0000gn/T/tmp.WEvuMSCEhV/sf.zip" "https://github.com/sfcompute/cli/releases/latest/download/sf-aarch64-apple-darwin.zip"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 39.2M 100 39.2M 0 0 26.0M 0 0:00:01 0:00:01 --:--:-- 54.9M
unzip -o "/var/folders/bd/847y_93d4tl6nwdgxdzs7lgm0000gn/T/tmp.WEvuMSCEhV/sf.zip" -d "/var/folders/bd/847y_93d4tl6nwdgxdzs7lgm0000gn/T/tmp.WEvuMSCEhV/dist"
Invalid extraction directory
Failed to extract sf
This is simply fixed by making the dist dir in the created TMPDIR. So from this:
# Extract the zip file in the temporary directory.
echo "unzip -o \"${TMPDIR}/${BINARY_NAME}.zip\" -d \"${TMPDIR}/dist\""
unzip -o "${TMPDIR}/${BINARY_NAME}.zip" -d "${TMPDIR}/dist" || { echo "Failed to extract sf"; exit 1; }
to this
# Extract the zip file in the temporary directory.
mkdir "${TMPDIR}/dist"
echo "unzip -o \"${TMPDIR}/${BINARY_NAME}.zip\" -d \"${TMPDIR}/dist\""
unzip -o "${TMPDIR}/${BINARY_NAME}.zip" -d "${TMPDIR}/dist" || { echo "Failed to extract sf"; exit 1; }
I'm not sure why this wouldn't fail on other machines -- maybe it's because unzip on MacOS has modifications made by Apple?
Hi! The install script fails on my Mac running MacOS 15.4. It seems like when running
unzip, the directorydistis not found:This is simply fixed by making the
distdir in the createdTMPDIR. So from this:to this
I'm not sure why this wouldn't fail on other machines -- maybe it's because
unzipon MacOS has modifications made by Apple?