Skip to content

Commit ce7aedf

Browse files
authored
Arm backend: Make setup.sh handle unset EULA variable (#9446)
If setup.sh was called without --i-agree-to-the-contained-eula or with ARM_FVP_INSTALL_I_AGREE_TO_THE_CONTAINED_EULA unset all you would get back is the error message: "examples/arm/setup.sh: line 88: ARM_FVP_INSTALL_I_AGREE_TO_THE_CONTAINED_EULA: unbound variable" This is not a good error message. This commit adds handling of this variable being unset and gives a proper error message on how to accept the EULA.
1 parent 05277dd commit ce7aedf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/arm/setup.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,10 @@ function setup_fvp() {
8484

8585
# Mandatory user arg --i-agree-to-the-contained-eula
8686
eula_acceptance="${1:-'.'}"
87+
eula_acceptance_by_variable="${ARM_FVP_INSTALL_I_AGREE_TO_THE_CONTAINED_EULA:-False}"
88+
8789
if [[ "${eula_acceptance}" != "--i-agree-to-the-contained-eula" ]]; then
88-
if [[ ${ARM_FVP_INSTALL_I_AGREE_TO_THE_CONTAINED_EULA} != "True" ]]; then
90+
if [[ ${eula_acceptance_by_variable} != "True" ]]; then
8991
echo "Must pass first positional argument '--i-agree-to-the-contained-eula' to agree to EULA associated with downloading the FVP. Exiting!"
9092
exit 1
9193
else

0 commit comments

Comments
 (0)