Skip to content

Commit 16dd460

Browse files
authored
Merge pull request #1460 from zexi/fix-buildah-run
fix(buildah): only use -e flag when buildah version gt 1.23
2 parents 0fe8b0a + 4731119 commit 16dd460

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ocboot.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,11 @@ buildah_version_minor=$(echo "$buildah_version" | awk -F. '{print $2}')
6060

6161
buildah_extra_args=()
6262

63-
# buildah accept --env since 1.23
63+
# buildah accepts --env since 1.23
6464
echo "buildah version: $buildah_version"
6565
if [[ $buildah_version_major -eq 1 ]] && [[ "$buildah_version_minor" -gt 23 ]]; then
6666
buildah_extra_args+=(-e ANSIBLE_VERBOSITY="${ANSIBLE_VERBOSITY:-0}")
67+
buildah_extra_args+=(-e HOME="$HOME")
6768
fi
6869

6970
cmd_extra_args=""
@@ -81,7 +82,6 @@ mkdir -p "$HOME/.kube"
8182
buildah run --isolation chroot --user $(id -u):$(id -g) \
8283
-t "${buildah_extra_args[@]}" \
8384
--net=host \
84-
-e "HOME=$HOME" \
8585
-v "$(mktemp -d):$HOME/.ansible" \
8686
-v "$HOME/.ssh:$HOME/.ssh" \
8787
-v "$HOME/.kube:$HOME/.kube" \

0 commit comments

Comments
 (0)