summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiaofeng Wang <wasphin@gmail.com>2022-02-07 13:45:11 +0800
committerXiaofeng Wang <wasphin@gmail.com>2022-02-08 08:04:18 +0000
commit0d17063e826b137ea00d40c01eca2924e895b8fd (patch)
tree31121361f8fc5947ebb2bd59455641241adc4f89
parentb8b5687f21dc6d4f4ef01cd68cb9e29d09779189 (diff)
downloadqt-creator-0d17063e826b137ea00d40c01eca2924e895b8fd.tar.gz
macOS: use string array to be compatible with both bash and zsh
By default, zsh does not split words in string by spaces. See https://zsh.sourceforge.io/FAQ/zshfaq03.html Change-Id: I167bae2af628be5b2fc9429a090628b6049f7ce4 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
-rwxr-xr-xshare/qtcreator/scripts/openTerminal.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/share/qtcreator/scripts/openTerminal.py b/share/qtcreator/scripts/openTerminal.py
index bae549ca9f..a0347c0867 100755
--- a/share/qtcreator/scripts/openTerminal.py
+++ b/share/qtcreator/scripts/openTerminal.py
@@ -42,9 +42,9 @@ def clean_environment_script():
'TERM_SESSION_ID'])
return r'''
function ignore() {
- local keys="''' + env_to_keep + '''"
+ local keys=(''' + env_to_keep + ''')
local v=$1
- for e in $keys; do [[ "$e" == "$v" ]] && return 0; done
+ for e in "${keys[@]}"; do [[ "$e" == "$v" ]] && return 0; done
}
while read -r line; do
key=$(echo $line | /usr/bin/cut -d '=' -f 1)