mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 22:28:00 +01:00
Don't pre-expand 'runtimepath'. Prevents untoward serialization of the default value.
This commit is contained in:
@@ -405,15 +405,16 @@ lookup:
|
|||||||
else if (input)
|
else if (input)
|
||||||
stdin.write(input);
|
stdin.write(input);
|
||||||
|
|
||||||
|
let shell = File.expandPath(options["shell"]);
|
||||||
// TODO: implement 'shellredir'
|
// TODO: implement 'shellredir'
|
||||||
if (util.OS.isWindows && !/sh/.test(options["shell"])) {
|
if (util.OS.isWindows && !/sh/.test(options["shell"])) {
|
||||||
command = "cd /D " + this.cwd + " && " + command + " > " + stdout.path + " 2>&1" + " < " + stdin.path;
|
command = "cd /D " + this.cwd + " && " + command + " > " + stdout.path + " 2>&1" + " < " + stdin.path;
|
||||||
var res = this.run(options["shell"], options["shellcmdflag"].split(/\s+/).concat(command), true);
|
var res = this.run(shell, options["shellcmdflag"].split(/\s+/).concat(command), true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
cmd.write("cd " + escape(this.cwd) + "\n" +
|
cmd.write("cd " + escape(this.cwd) + "\n" +
|
||||||
["exec", ">" + escape(stdout.path), "2>&1", "<" + escape(stdin.path),
|
["exec", ">" + escape(stdout.path), "2>&1", "<" + escape(stdin.path),
|
||||||
escape(options["shell"]), options["shellcmdflag"], escape(command)].join(" "));
|
escape(shell), options["shellcmdflag"], escape(command)].join(" "));
|
||||||
res = this.run("/bin/sh", ["-e", cmd.path], true);
|
res = this.run("/bin/sh", ["-e", cmd.path], true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -752,13 +753,11 @@ lookup:
|
|||||||
|
|
||||||
options.add(["runtimepath", "rtp"],
|
options.add(["runtimepath", "rtp"],
|
||||||
"List of directories searched for runtime files",
|
"List of directories searched for runtime files",
|
||||||
"stringlist", IO.runtimePath,
|
"stringlist", IO.runtimePath);
|
||||||
{ setter: function (value) File.expandPathList(value) });
|
|
||||||
|
|
||||||
options.add(["shell", "sh"],
|
options.add(["shell", "sh"],
|
||||||
"Shell to use for executing :! and :run commands",
|
"Shell to use for executing :! and :run commands",
|
||||||
"string", shell,
|
"string", shell);
|
||||||
{ setter: function (value) File.expandPath(value) });
|
|
||||||
|
|
||||||
options.add(["shellcmdflag", "shcf"],
|
options.add(["shellcmdflag", "shcf"],
|
||||||
"Flag passed to shell when executing :! and :run commands",
|
"Flag passed to shell when executing :! and :run commands",
|
||||||
|
|||||||
Reference in New Issue
Block a user