mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-10 13:33:24 -05:00
fix: say nothing was run when the fingerprint differs
This commit is contained in:
1 parent
ab170f990d
commit
771c38ab09
3 files changed
+14
-10
No files matched your search
+1
-1
@@ -38,7 +38,7 @@ try {
|
|||||||
}
|
}
|
||||||
$actual = (Get-FileHash -LiteralPath $temporary -Algorithm SHA256).Hash.ToLowerInvariant()
|
$actual = (Get-FileHash -LiteralPath $temporary -Algorithm SHA256).Hash.ToLowerInvariant()
|
||||||
if ($actual -ne $expected.ToLowerInvariant()) {
|
if ($actual -ne $expected.ToLowerInvariant()) {
|
||||||
throw "install.py SHA-256 mismatch."
|
throw "The downloaded installer does not match its expected fingerprint. Nothing was run and nothing was written. The download was most likely cut short; try again, on another network if possible."
|
||||||
}
|
}
|
||||||
$installer = $temporary
|
$installer = $temporary
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-3
@@ -56,7 +56,8 @@ if [ -z "$INSTALLER" ] || [ ! -f "$INSTALLER" ]; then
|
|||||||
elif command -v wget >/dev/null 2>&1; then
|
elif command -v wget >/dev/null 2>&1; then
|
||||||
wget --https-only --output-document="$TEMP_INSTALLER" "$install_url"
|
wget --https-only --output-document="$TEMP_INSTALLER" "$install_url"
|
||||||
else
|
else
|
||||||
echo "Error: curl or wget is required." >&2
|
echo "Error: curl or wget is required to download the installer." >&2
|
||||||
|
echo " On Debian or Ubuntu: sudo apt install curl" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
actual_size=$(wc -c < "$TEMP_INSTALLER" | tr -d ' ')
|
actual_size=$(wc -c < "$TEMP_INSTALLER" | tr -d ' ')
|
||||||
@@ -74,7 +75,9 @@ if [ -z "$INSTALLER" ] || [ ! -f "$INSTALLER" ]; then
|
|||||||
fi
|
fi
|
||||||
expected=$(printf '%s' "$expected" | tr '[:upper:]' '[:lower:]')
|
expected=$(printf '%s' "$expected" | tr '[:upper:]' '[:lower:]')
|
||||||
if [ "$actual" != "$expected" ]; then
|
if [ "$actual" != "$expected" ]; then
|
||||||
echo "Error: install.py SHA-256 mismatch." >&2
|
echo "Error: the downloaded installer does not match its expected fingerprint." >&2
|
||||||
|
echo " Nothing was run and nothing was written." >&2
|
||||||
|
echo " The download was most likely cut short. Try again, on another network if possible." >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
INSTALLER="$TEMP_INSTALLER"
|
INSTALLER="$TEMP_INSTALLER"
|
||||||
@@ -89,7 +92,8 @@ for command_name in python3 python; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ -z "$PYTHON" ]; then
|
if [ -z "$PYTHON" ]; then
|
||||||
echo "Error: Python 3 is required." >&2
|
echo "Error: Python 3.8 or newer is required." >&2
|
||||||
|
echo " Install it, then run this command again. On Debian or Ubuntu: sudo apt install python3" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -148,16 +148,16 @@ its BIOS folder, see [Getting started](getting-started.md).
|
|||||||
|
|
||||||
### Error: Python 3.8 or newer is required.
|
### Error: Python 3.8 or newer is required.
|
||||||
|
|
||||||
Python is missing from the machine. On Debian and Ubuntu, `sudo apt install
|
Python is missing from the machine. The message names the command that installs
|
||||||
python3`; on a handheld running Batocera or Recalbox it is already there, so
|
it, `sudo apt install python3` on Debian and Ubuntu; on a handheld running Batocera or Recalbox it is already there, so
|
||||||
this message usually means the command ran on the computer rather than on the
|
this message usually means the command ran on the computer rather than on the
|
||||||
console.
|
console.
|
||||||
|
|
||||||
### Error: install.py SHA-256 mismatch.
|
### Error: the downloaded installer does not match its expected fingerprint.
|
||||||
|
|
||||||
Nothing was run. The download did not match the fingerprint the script expects,
|
Nothing was run and nothing was written. The download did not match the
|
||||||
which is almost always a truncated or intercepted transfer. Running the command
|
fingerprint the script carries, which is almost always a transfer cut short.
|
||||||
again, on another network if possible, is the answer.
|
Running the command again, on another network if possible, is the answer.
|
||||||
|
|
||||||
### Cannot create ...
|
### Cannot create ...
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user