mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 16:52:25 +01:00
change to our internal CWD before executing external commands
This commit is contained in:
@@ -712,9 +712,11 @@ lookup:
|
||||
return "";
|
||||
|
||||
if (WINDOWS)
|
||||
command += " > " + stdoutFile.path + " 2> " + stderrFile.path;
|
||||
command = "cd /D " + cwd + " && " + command + " > " + stdoutFile.path + " 2> " + stderrFile.path;
|
||||
else
|
||||
command += " > \"" + escapeQuotes(stdoutFile.path) + "\"" + " 2> \"" + escapeQuotes(stderrFile.path) + "\"";
|
||||
// TODO: should we only attempt the actual command conditionally on a successful cd?
|
||||
command = "cd " + escapeQuotes(cwd) + "; " + command + " > \"" + escapeQuotes(stdoutFile.path) + "\""
|
||||
+ " 2> \"" + escapeQuotes(stderrFile.path) + "\"";
|
||||
|
||||
var stdinFile = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user