From 3a4286965393b6edde814dc3afe55f353ed78a24 Mon Sep 17 00:00:00 2001 From: blinry Date: Fri, 19 Feb 2021 11:50:34 +0100 Subject: [PATCH] Keep user's PATH, but extend it with our script directory Fixes #11. --- scenes/shell.gd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scenes/shell.gd b/scenes/shell.gd index e47e852..e406540 100644 --- a/scenes/shell.gd +++ b/scenes/shell.gd @@ -48,11 +48,12 @@ func run_async_thread(shell_command): var env = {} env["HOME"] = game.tmp_prefix - env["PATH"] = game.tmp_prefix+":/usr/bin:/bin:/mingw64/bin/" var hacky_command = "" for variable in env: hacky_command += "export %s='%s';" % [variable, env[variable]] + + hacky_command += "export PATH=\'"+game.tmp_prefix+":'\"$PATH\";" hacky_command += "cd '%s' || exit 1;" % _cwd hacky_command += command