From 65f743c6993dcdab2156dee59814332d4a65648a Mon Sep 17 00:00:00 2001 From: Chris Gremo Date: Mon, 26 Nov 2018 14:42:02 -0600 Subject: [PATCH] =?UTF-8?q?Fix=20to=20escape=20options=20containing=20?= =?UTF-8?q?=E2=80=98<>=E2=80=99=20on=20windows=20platform?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/run | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/run b/src/run index caea5c3b0..6361b207f 100755 --- a/src/run +++ b/src/run @@ -19,8 +19,15 @@ base_dir=$(cd "`dirname "$loc"`" > /dev/null && pwd) # Determine os version and choose correspondent .sh or .bat file accordingly. os_version="`uname -a`" -if [[ $os_version == *"MINGW"* ]]; then - cmd //C "$base_dir/target/start.bat" "$@" -else +if [[ $os_version == *"MINGW"* ]]; then + PARAMS="" + for PARAM in "$@" + do + escaped="${PARAM//^^^>}" + PARAMS=( ${PARAMS[@]} "${escaped}" ) + done + cmd //C "$base_dir/target/start.bat" "${PARAMS[@]}" +else exec "$base_dir/target/start" "$@" fi