From b32c236103d91bbbcb35f00a5cca89590bc390d9 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Fri, 2 May 2025 12:45:52 +0700 Subject: [PATCH 1/3] maint(common): rename gosh.sh to gosh and use /usr/bin/env bash Fixes: #13822 --- resources/gosh/{gosh.sh => gosh} | 0 resources/gosh/gosh.js | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename resources/gosh/{gosh.sh => gosh} (100%) diff --git a/resources/gosh/gosh.sh b/resources/gosh/gosh similarity index 100% rename from resources/gosh/gosh.sh rename to resources/gosh/gosh diff --git a/resources/gosh/gosh.js b/resources/gosh/gosh.js index 47a6900c16..de3c8cfc30 100755 --- a/resources/gosh/gosh.js +++ b/resources/gosh/gosh.js @@ -108,6 +108,6 @@ function launchWin32Bash() { } function launchNixBash() { - const child_args = args.slice(1); - return child_process.spawnSync(args[0], child_args, {shell: '/bin/bash', stdio:'inherit'}); + const child_args = ['bash', ...args.slice(1)]; + return child_process.spawnSync(args[0], child_args, {shell: '/usr/bin/env', stdio:'inherit'}); } From 17ff99a18b2f4edf0a822b233939080132ffdf2c Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Fri, 2 May 2025 12:50:14 +0700 Subject: [PATCH 2/3] chore(common): /bin/bash to launch the shell --- resources/gosh/gosh.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/gosh/gosh.js b/resources/gosh/gosh.js index de3c8cfc30..fd37968b14 100755 --- a/resources/gosh/gosh.js +++ b/resources/gosh/gosh.js @@ -109,5 +109,5 @@ function launchWin32Bash() { function launchNixBash() { const child_args = ['bash', ...args.slice(1)]; - return child_process.spawnSync(args[0], child_args, {shell: '/usr/bin/env', stdio:'inherit'}); + return child_process.spawnSync(args[0], child_args, {shell: '/bin/bash', stdio:'inherit'}); } From 76e9a789b0db7d86b7f5763ad8d65cb09af9e34f Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Fri, 2 May 2025 13:04:39 +0700 Subject: [PATCH 3/3] chore(common): restore gosh.js --- resources/gosh/gosh.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/gosh/gosh.js b/resources/gosh/gosh.js index fd37968b14..47a6900c16 100755 --- a/resources/gosh/gosh.js +++ b/resources/gosh/gosh.js @@ -108,6 +108,6 @@ function launchWin32Bash() { } function launchNixBash() { - const child_args = ['bash', ...args.slice(1)]; + const child_args = args.slice(1); return child_process.spawnSync(args[0], child_args, {shell: '/bin/bash', stdio:'inherit'}); }