diff --git a/dev/environment-setup.sh b/dev/environment-setup.sh index e639d5eeac641e36e061d614f1da9621a2581046..aded2020d351c72c1ecc89ec0157d627960c0844 100755 --- a/dev/environment-setup.sh +++ b/dev/environment-setup.sh @@ -11,6 +11,9 @@ set -o pipefail # environment. This script should be sourced rather than executed in a # subprocess. e.g. source dev/environment-setup.sh +# Arguments passed to this script are passed through to the kayobe-env script +# in kayobe-config. This can be used to set the Kayobe environment. + PARENT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" source "${PARENT}/functions" @@ -18,10 +21,10 @@ source "${PARENT}/functions" function main { config_init - environment_setup + environment_setup "$@" } -main +main "$@" # Restore previous shell options. eval "$oldstate" diff --git a/dev/functions b/dev/functions index 147477a10f80f17dbdd7b9492f047f2b84d7d838..65723c89d7aa3207f4357d85966ccfbdd96ef0f3 100644 --- a/dev/functions +++ b/dev/functions @@ -215,7 +215,7 @@ function environment_setup { set +u source "${KAYOBE_VENV_PATH}/bin/activate" set -u - source "${KAYOBE_CONFIG_SOURCE_PATH}/kayobe-env" + source "${KAYOBE_CONFIG_SOURCE_PATH}/kayobe-env" "$@" } function run_kayobe {