From cb2038b7494d2d67a7430e1ff56ed6ecfa73346e Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Fri, 3 Dec 2010 22:53:31 -0500 Subject: [PATCH] Don't pre-expand 'runtimepath'. Prevents untoward serialization of the default value. --- common/content/io.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/common/content/io.js b/common/content/io.js index de3b79a3..85593ad8 100644 --- a/common/content/io.js +++ b/common/content/io.js @@ -405,15 +405,16 @@ lookup: else if (input) stdin.write(input); + let shell = File.expandPath(options["shell"]); // TODO: implement 'shellredir' if (util.OS.isWindows && !/sh/.test(options["shell"])) { 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 { cmd.write("cd " + escape(this.cwd) + "\n" + ["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); } @@ -752,13 +753,11 @@ lookup: options.add(["runtimepath", "rtp"], "List of directories searched for runtime files", - "stringlist", IO.runtimePath, - { setter: function (value) File.expandPathList(value) }); + "stringlist", IO.runtimePath); options.add(["shell", "sh"], "Shell to use for executing :! and :run commands", - "string", shell, - { setter: function (value) File.expandPath(value) }); + "string", shell); options.add(["shellcmdflag", "shcf"], "Flag passed to shell when executing :! and :run commands",