Clean up temp Dockerfile in update.sh before fatal exit

This commit is contained in:
Peter Dave Hello 2022-02-01 21:54:13 +08:00
parent fd6cc93f67
commit f62de3fcb1
1 changed files with 1 additions and 0 deletions

View File

@ -160,6 +160,7 @@ function update_node_version() {
curl -sSL --compressed "https://unofficial-builds.nodejs.org/download/release/v${nodeVersion}/SHASUMS256.txt" | grep "node-v${nodeVersion}-linux-x64-musl.tar.xz" | cut -d' ' -f1
)
if [ -z "$checksum" ]; then
rm -f "${dockerfile}-tmp"
fatal "Failed to fetch checksum for version ${nodeVersion}"
fi
sed -Ei -e "s/(alpine:)0.0/\\1${alpine_version}/" "${dockerfile}-tmp"