Fail if we do fail with su in the install script
Our only fallback was sudo, but we did not have a fail backup.
@@ -79,7 +79,9 @@ main() {
local _install_dir
_install_dir="$(sdk_install_dir)"
mkdir -p "${_install_dir}" || true
- mv "$_dfx_file" "${_install_dir}" || sudo mv "$_dfx_file" "${_install_dir}"
+
+ mv "$_dfx_file" "${_install_dir}" || sudo mv "$_dfx_file" "${_install_dir}" \
+ || err "Failed to install the DFINITY Developement Kit: please check your permissions and try again."
log "Installed $_install_dir/dfx"
