From d9aa5ab21a6f7847936c14ddce3ed6032088b437 Mon Sep 17 00:00:00 2001 From: Vincent de Saboulin Date: Thu, 27 Jul 2023 16:14:52 +0200 Subject: [PATCH] wip --- scripts/cli/playground | 3 ++- scripts/cli/src/bootstrap_reproduction_model_command.sh | 1 + scripts/cli/src/lib/utils_function.sh | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/cli/playground b/scripts/cli/playground index 7c528cea5..34341ca19 100755 --- a/scripts/cli/playground +++ b/scripts/cli/playground @@ -7685,7 +7685,7 @@ function force_enable () { env_variable=$2 logwarn "💪 Forcing $flag ($env_variable env variable)" - line_final_source=$(grep -n 'source ${DIR}/../../scripts/utils.sh' $repro_test_file | cut -d ":" -f 1 | tail -n1) + line_final_source=$(grep -n 'source ${DIR}/../../scripts/utils.sh$' $repro_test_file | cut -d ":" -f 1 | tail -n1) tmp_dir=$(mktemp -d -t ci-XXXXXXXXXX) trap 'rm -rf $tmp_dir' EXIT echo "# remove or comment those lines if you don't need it anymore" > $tmp_dir/tmp_force_enable @@ -8745,6 +8745,7 @@ playground_bootstrap_reproduction_model_command() { tmp_dir=$(mktemp -d -t ci-XXXXXXXXXX) trap 'rm -rf $tmp_dir' EXIT + set +e echo "#!/bin/bash" > $tmp_dir/intro echo "###############################################" >> $tmp_dir/intro echo "# 🗓️ date: `date`" >> $tmp_dir/intro diff --git a/scripts/cli/src/bootstrap_reproduction_model_command.sh b/scripts/cli/src/bootstrap_reproduction_model_command.sh index 380182796..df2c61853 100644 --- a/scripts/cli/src/bootstrap_reproduction_model_command.sh +++ b/scripts/cli/src/bootstrap_reproduction_model_command.sh @@ -171,6 +171,7 @@ fi tmp_dir=$(mktemp -d -t ci-XXXXXXXXXX) trap 'rm -rf $tmp_dir' EXIT +set +e echo "#!/bin/bash" > $tmp_dir/intro echo "###############################################" >> $tmp_dir/intro echo "# 🗓️ date: `date`" >> $tmp_dir/intro diff --git a/scripts/cli/src/lib/utils_function.sh b/scripts/cli/src/lib/utils_function.sh index 23ed14f6d..bffd4ea63 100644 --- a/scripts/cli/src/lib/utils_function.sh +++ b/scripts/cli/src/lib/utils_function.sh @@ -3413,7 +3413,7 @@ function force_enable () { env_variable=$2 logwarn "💪 Forcing $flag ($env_variable env variable)" - line_final_source=$(grep -n 'source ${DIR}/../../scripts/utils.sh' $repro_test_file | cut -d ":" -f 1 | tail -n1) + line_final_source=$(grep -n 'source ${DIR}/../../scripts/utils.sh$' $repro_test_file | cut -d ":" -f 1 | tail -n1) tmp_dir=$(mktemp -d -t ci-XXXXXXXXXX) trap 'rm -rf $tmp_dir' EXIT echo "# remove or comment those lines if you don't need it anymore" > $tmp_dir/tmp_force_enable