fix(cli): harden tht installer replacement
This commit is contained in:
@@ -41,13 +41,15 @@ write_artifact "$artifact_one" "tht test version one"
|
||||
write_artifact "$artifact_two" "tht test version two"
|
||||
|
||||
system_path=$PATH
|
||||
installer_bash=${THT_TEST_BASH:-/bin/bash}
|
||||
test -x "$installer_bash" || fail "THT_TEST_BASH must name an executable Bash interpreter"
|
||||
run_installer() {
|
||||
local artifact=$1
|
||||
THT_INSTALL_DIRECTORY="$test_directory" \
|
||||
THT_BUILD_ARTIFACT="$artifact" \
|
||||
THT_BUILD_ARTIFACT_SHA256="$(sha256 "$artifact")" \
|
||||
PATH="$test_directory:$system_path" \
|
||||
bash "$installer"
|
||||
"$installer_bash" "$installer"
|
||||
}
|
||||
|
||||
run_installer "$artifact_one"
|
||||
|
||||
Reference in New Issue
Block a user