From 76ddea74f36b1b329eabb3613c125804173d6924 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Mon, 5 Feb 2024 18:20:29 +0100 Subject: [PATCH] fix(install): override file Signed-off-by: rjshrjndrn --- scripts/helmcharts/openreplay-cli | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/helmcharts/openreplay-cli b/scripts/helmcharts/openreplay-cli index 971fc530c..9f305b1f4 100755 --- a/scripts/helmcharts/openreplay-cli +++ b/scripts/helmcharts/openreplay-cli @@ -249,12 +249,17 @@ function install() { # process override file while installing # OVERRIDE_FILE=/tmp/override.yaml openreplay -i [[ -z $OVERRIDE_FILE ]] || { + [[ -f $OVERRIDE_FILE ]] || { + echo "OVERRIDE_FILE does not exist, exiting" + exit 100 + } override_tmpdir=$(pwd) err_cd /tmp cp "$OVERRIDE_FILE" new_vars.yaml cp "$override_tmpdir/vars.yaml" old_vars.yaml yq '(load("old_vars.yaml") | .. | select(tag != "!!map" and tag != "!!seq")) as $i ireduce(.; setpath($i | path; $i))' new_vars.yaml >vars.yaml mv vars.yaml "$override_tmpdir" + err_cd "$override_tmpdir" } SKIP_K8S_TOOLS=1 DOMAIN_NAME=$domain_name bash init.sh return