mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-01 03:55:46 +01:00
Fix oversights in last commit.
This commit is contained in:
@@ -91,10 +91,10 @@ var IO = Module("io", {
|
|||||||
* @param {boolean} all Whether all found files should be sourced.
|
* @param {boolean} all Whether all found files should be sourced.
|
||||||
*/
|
*/
|
||||||
sourceFromRuntimePath: function sourceFromRuntimePath(paths, all) {
|
sourceFromRuntimePath: function sourceFromRuntimePath(paths, all) {
|
||||||
let dirs = options["runtimepath"];
|
let dirs = modules.options["runtimepath"];
|
||||||
let found = false;
|
let found = false;
|
||||||
|
|
||||||
dactyl.echomsg("Searching for " + paths.join(" ").quote() + " in " + options.get("runtimepath").stringValue, 2);
|
dactyl.echomsg("Searching for " + paths.join(" ").quote() + " in " + modules.options.get("runtimepath").stringValue, 2);
|
||||||
|
|
||||||
outer:
|
outer:
|
||||||
for (let [, dir] in Iterator(dirs)) {
|
for (let [, dir] in Iterator(dirs)) {
|
||||||
@@ -351,7 +351,7 @@ var IO = Module("io", {
|
|||||||
|
|
||||||
let file;
|
let file;
|
||||||
|
|
||||||
if (File.isAbsolutePath(program))
|
if (program instanceof File || File.isAbsolutePath(program))
|
||||||
file = this.File(program, true);
|
file = this.File(program, true);
|
||||||
else
|
else
|
||||||
file = this.pathSearch(program);
|
file = this.pathSearch(program);
|
||||||
@@ -406,21 +406,21 @@ var IO = Module("io", {
|
|||||||
else if (input)
|
else if (input)
|
||||||
stdin.write(input);
|
stdin.write(input);
|
||||||
|
|
||||||
let shell = File.expandPath(storage["options"].get("shell").value);
|
let shell = File(storage["options"].get("shell").value);
|
||||||
let shcf = storage["options"].get("shellcmdflag").value;
|
let shcf = storage["options"].get("shellcmdflag").value;
|
||||||
|
|
||||||
if (isArray(command))
|
if (isArray(command))
|
||||||
command = command.map(escape).join(" ");
|
command = command.map(escape).join(" ");
|
||||||
|
|
||||||
// TODO: implement 'shellredir'
|
// TODO: implement 'shellredir'
|
||||||
if (util.OS.isWindows && !/sh/.test(options["shell"])) {
|
if (util.OS.isWindows && !/sh/.test(shell.leafName)) {
|
||||||
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(shell, shcf.split(/\s+/).concat(command), true);
|
var res = this.run(shell, shcf.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(shell), shcf, escape(command)].join(" "));
|
escape(shell.path), shcf, escape(command)].join(" "));
|
||||||
res = this.run("/bin/sh", ["-e", cmd.path], true);
|
res = this.run("/bin/sh", ["-e", cmd.path], true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user