Skip to content

Commit

Permalink
libvirt: Fix shell reload
Browse files Browse the repository at this point in the history
I experimented with moving the shell reload straight after
the pipx ensurepath when discussing this with Magnus, but
in the GHA once merged this doesn't seem to be working as
the reload means the script ends, so we need to move this back.

As a further measure to protect the CI, only run the shell
reload if $CI != true.

Signed-off-by: stevenhorsman <[email protected]>
  • Loading branch information
stevenhorsman committed Dec 17, 2024
1 parent 8f534e3 commit 2592209
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/cloud-api-adaptor/libvirt/config_libvirt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ installKcli() {
# export PATH="$PATH:$HOME/.local/bin"
pipx install kcli==${kcli_version}
pipx ensurepath
# Reload shell so that pipx install PATH is available
exec $SHELL
else
sudo pip3 install kcli==${kcli_version}
fi
Expand Down Expand Up @@ -140,3 +138,8 @@ case $TEST_E2E_SECURE_COMMS in
echo "SECURE_COMMS=\"false\"" >> libvirt.properties
;;
esac

if [[ "${OS_DISTRO}" == "ubuntu" ]] && [[ "${CI:-}" != "true" ]]; then
# Reload shell so that pipx install PATH is available
exec $SHELL
fi

0 comments on commit 2592209

Please sign in to comment.