diff --git a/flux/flux-bootstrap.sh b/flux/flux-bootstrap.sh index 3070449..b460f9a 100755 --- a/flux/flux-bootstrap.sh +++ b/flux/flux-bootstrap.sh @@ -33,10 +33,12 @@ if flux version &>/dev/null; then fi # Determine what VCS we need to bootstrap +# Starting in kairos 2.8.15, kairos-agent command returns empty string instead of "null" for vcs in bitbucket_server git github gitlab; do # kairos-agent used to return `null` when a key wasn't set, now returns empty. # we handle both - if [[ $(kairos-agent config get flux.$vcs 2>/dev/null) != "" ]] && [[ $(kairos-agent config get flux.$vcs 2>/dev/null) != "null" ]]; then + value=$(kairos-agent config get flux.$vcs 2>/dev/null) + if [[ $value != "null" && -n $value ]]; then version_control=$vcs break fi @@ -119,4 +121,4 @@ else fi error "Failed to bootstrap with Flux, timed out ($minutes minutes)" -exit 4 \ No newline at end of file +exit 4