From d29f94a8d46954d73a9cea679a40cd70e08fb2c1 Mon Sep 17 00:00:00 2001 From: Johan Siebens Date: Tue, 7 Jun 2022 21:04:44 +0200 Subject: [PATCH] set HOME variable when not available, e.g when running with cloud-init Signed-off-by: Johan Siebens --- hack/install.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hack/install.sh b/hack/install.sh index 0675502..ac07e74 100755 --- a/hack/install.sh +++ b/hack/install.sh @@ -12,6 +12,13 @@ export REPO="faasd" # to the arkade binary. export ARKADE=/usr/local/bin/arkade +# When running as a startup script (cloud-init), the HOME variable is not always set. +# As it is required for arkade to properly download tools, +# set the variable to /usr/local so arkade will download binaries to /usr/local/.arkade +if [ -z "${HOME}" ]; then + export HOME=/usr/local +fi + version="" echo "Finding latest version from GitHub"