From b4a6303b14fc17e033e0a8505ecf0130fbf4dfe6 Mon Sep 17 00:00:00 2001 From: Jose Carlos Venegas Munoz Date: Tue, 31 Jul 2018 15:21:20 -0500 Subject: [PATCH] ci: Fix ci when tmp_dir is not set. When tmp_dir is not set and lib.sh is sourced could lead to fail. Fix: #116 Signed-off-by: Jose Carlos Venegas Munoz --- scripts/lib.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/lib.sh b/scripts/lib.sh index b1a02e82d6..adcc7848e5 100644 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -1,6 +1,6 @@ export GOPATH=${GOPATH:-${HOME}/go} readonly kata_arch_sh="${GOPATH}/src/github.com/kata-containers/tests/.ci/kata-arch.sh" -hub_bin="${tmp_dir}/hub-bin" +hub_bin="hub-bin" get_kata_arch(){ go get -u github.com/kata-containers/tests || true @@ -69,6 +69,8 @@ build_hub() { if cmd=$(command -v hub); then hub_bin="${cmd}" return + else + hub_bin="${tmp_dir:-/tmp}/hub-bin" fi local hub_repo="github.com/github/hub"