You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the ProperTree.command script file:
curl "$url" -o "$tempdir/python.pkg"
if [ "$?" != "0" ]; then
echo
echo " - Failed to install python!"
echo
exit $?
fi
The exit code( $?) of curl will be replaced by echo, it always be zerio. If it needs the exit code, use a variable to store, like this:
curl "$url" -o "$tempdir/python.pkg"
RET=$?
if [ "${RET}" != "0" ]; then
echo
echo " - Failed to install python!"
echo
exit ${RET}
fi
or more simple :
curl "$url" -o "$tempdir/python.pkg" || {
echo
echo " - Failed to install python!"
echo
}
because that the error was handled already and the exit code was dropped at last.
The text was updated successfully, but these errors were encountered:
In the ProperTree.command script file:
curl "$url" -o "$tempdir/python.pkg"
if [ "$?" != "0" ]; then
echo
echo " - Failed to install python!"
echo
exit $?
fi
The exit code( $?) of curl will be replaced by echo, it always be zerio. If it needs the exit code, use a variable to store, like this:
curl "$url" -o "$tempdir/python.pkg"
RET=$?
if [ "${RET}" != "0" ]; then
echo
echo " - Failed to install python!"
echo
exit ${RET}
fi
or more simple :
curl "$url" -o "$tempdir/python.pkg" || {
echo
echo " - Failed to install python!"
echo
}
because that the error was handled already and the exit code was dropped at last.
The text was updated successfully, but these errors were encountered: