mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 23:02:27 +01:00
change to our internal CWD before executing external commands
This commit is contained in:
@@ -712,9 +712,11 @@ lookup:
|
|||||||
return "";
|
return "";
|
||||||
|
|
||||||
if (WINDOWS)
|
if (WINDOWS)
|
||||||
command += " > " + stdoutFile.path + " 2> " + stderrFile.path;
|
command = "cd /D " + cwd + " && " + command + " > " + stdoutFile.path + " 2> " + stderrFile.path;
|
||||||
else
|
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;
|
var stdinFile = null;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user