fix(cli): harden tht installer replacement
This commit is contained in:
@@ -43,7 +43,9 @@ validate_packaged_artifact() {
|
||||
expected=${THT_BUILD_ARTIFACT_SHA256:-}
|
||||
[[ "$expected" =~ ^[[:xdigit:]]{64}$ ]] || fail "THT_BUILD_ARTIFACT_SHA256 must be a 64-character SHA-256 digest"
|
||||
actual=$(sha256 "$artifact")
|
||||
[[ "${actual,,}" == "${expected,,}" ]] || fail "packaged tht artifact checksum does not match"
|
||||
actual=$(printf '%s' "$actual" | tr '[:upper:]' '[:lower:]')
|
||||
expected=$(printf '%s' "$expected" | tr '[:upper:]' '[:lower:]')
|
||||
[[ "$actual" == "$expected" ]] || fail "packaged tht artifact checksum does not match"
|
||||
}
|
||||
|
||||
build_artifact() {
|
||||
|
||||
Reference in New Issue
Block a user