Fix empty TRITONSHELL_DATA_CENTERS var
This commit is contained in:
parent
19e34f02b5
commit
ada06c3c43
|
@ -6,9 +6,14 @@ with pkgs.nodePackages;
|
|||
# Docs: https://docs.greenbaum.cloud/en/devops/triton-cli.html
|
||||
# triton CLI source: https://github.com/tritonDataCenter/node-triton
|
||||
cnsBaseDomain=$TRITONSHELL_CNS_BASE_DOMAIN
|
||||
dataCenters=$TRITONSHELL_DATA_CENTERS
|
||||
mantaDomain=$TRITONSHELL_MANTA_DOMAIN
|
||||
tritonApiDomain=$TRITONSHELL_TRITON_API_DOMAIN
|
||||
if [ -n "$ZSH_VERSION" ]; then
|
||||
IFS=" " read -r -A dataCenters <<< "$TRITONSHELL_DATA_CENTERS"
|
||||
elif [ -n "$BASH_VERSION" ]; then
|
||||
# https://github.com/koalaman/shellcheck/wiki/SC2206
|
||||
IFS=" " read -r -a dataCenters <<< "$TRITONSHELL_DATA_CENTERS"
|
||||
fi
|
||||
|
||||
# Set triton and docker host environment variables
|
||||
eval "$(${triton}/bin/triton env)"
|
||||
|
|
|
@ -97,7 +97,7 @@ in
|
|||
extra = ''
|
||||
export \
|
||||
TRITONSHELL_CNS_BASE_DOMAIN=${cnsBaseDomain} \
|
||||
TRITONSHELL_DATA_CENTERS=(${pkgs.lib.concatStringsSep " " dataCenters}) \
|
||||
TRITONSHELL_DATA_CENTERS="${pkgs.lib.concatStringsSep " " dataCenters}" \
|
||||
TRITONSHELL_MANTA_DOMAIN=${mantaDomain} \
|
||||
TRITONSHELL_TRITON_API_DOMAIN=${tritonApiDomain}
|
||||
if [ -z "$TRITON_DONT_SOURCE_PROFILE" ]; then
|
||||
|
|
Loading…
Reference in a new issue