From bce470879cdd9c9a2ba519f20ea1e66475ba5d8a Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Fri, 4 Oct 2024 14:29:26 -0400 Subject: [PATCH] [FIX] script open terminal: ignore opening if path not exist --- script/open_terminal_code_generator.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/script/open_terminal_code_generator.sh b/script/open_terminal_code_generator.sh index 257934d..471e697 100755 --- a/script/open_terminal_code_generator.sh +++ b/script/open_terminal_code_generator.sh @@ -19,6 +19,9 @@ if [[ "${OSTYPE}" == "linux-gnu" ]]; then cmd_after=";gnome-terminal --tab -- bash -c 'git status;bash';" LONGCMD="" for t in "${paths[@]}"; do + if [[ ! -e "${t}" ]]; then + continue + fi if $first_iteration; then LONGCMD+="${cmd_before}${t}${cmd_after_first}" first_iteration=false