From 9b0a64f90f990db3bc65a312f156556eff20dee2 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Fri, 27 Jan 2023 17:03:38 +0100 Subject: [PATCH] chore(cli): Better error handling Signed-off-by: rjshrjndrn --- scripts/helmcharts/openreplay-cli | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/helmcharts/openreplay-cli b/scripts/helmcharts/openreplay-cli index 836f2cf51..684aab3da 100755 --- a/scripts/helmcharts/openreplay-cli +++ b/scripts/helmcharts/openreplay-cli @@ -33,7 +33,10 @@ function exists() { } function err_cd() { - cd "$1" &> /dev/null || (log err not able to cd to "$1" && exit 100) + if ! cd "$1" &> /dev/null ; then + log err not able to cd to "$1" + exit 100 + fi } function log () {