Skip to content

Commit

Permalink
WIP: allow unclean skc
Browse files Browse the repository at this point in the history
  • Loading branch information
MoteHue committed Oct 10, 2023
1 parent fd94d11 commit c97cc8a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions functions
Original file line number Diff line number Diff line change
Expand Up @@ -595,11 +595,14 @@ function install_kayobe_venv {
function create_kayobe_environment {
local env=$1
local kayobe_config_source_path=${2:-$KAYOBE_CONFIG_SOURCE_PATH}
local allow_unclean_kayobe_config=${KAYOBE_AUTOMATION_ALLOW_UNCLEAN_KAYOBE_CONFIG:-false}
mkdir -p "$env"/{src/kayobe,src/kayobe-config,venvs/kayobe}

# Ensure we have an unmodified copy of kayobe-config
if [[ $(realpath "$kayobe_config_source_path") != $(realpath "$env/src/kayobe-config") ]]; then
clean_copy "$kayobe_config_source_path" "$env/src/kayobe-config"
if [ $allow_unclean_kayobe_config != true]; then
# Ensure we have an unmodified copy of kayobe-config
if [[ $(realpath "$kayobe_config_source_path") != $(realpath "$env/src/kayobe-config") ]]; then
clean_copy "$kayobe_config_source_path" "$env/src/kayobe-config"
fi
fi

if [ -f "$kayobe_config_source_path/requirements.txt" ]; then
Expand Down

0 comments on commit c97cc8a

Please sign in to comment.