Skip to content

Commit 65d113b

Browse files
kellycampbelldcodeIO
authored andcommitted
CLI: Get node executable path from process.execPath (#1018)
1 parent a927a66 commit 65d113b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cli/pbts.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ exports.main = function(args, callback) {
9898
// There is no proper API for jsdoc, so this executes the CLI and pipes the output
9999
var basedir = path.join(__dirname, ".");
100100
var moduleName = argv.name || "null";
101-
var cmd = "node \"" + require.resolve("jsdoc/jsdoc.js") + "\" -c \"" + path.join(basedir, "lib", "tsd-jsdoc.json") + "\" -q \"module=" + encodeURIComponent(moduleName) + "&comments=" + Boolean(argv.comments) + "\" " + files.map(function(file) { return "\"" + file + "\""; }).join(" ");
101+
var nodePath = process.execPath;
102+
var cmd = nodePath + " \"" + require.resolve("jsdoc/jsdoc.js") + "\" -c \"" + path.join(basedir, "lib", "tsd-jsdoc.json") + "\" -q \"module=" + encodeURIComponent(moduleName) + "&comments=" + Boolean(argv.comments) + "\" " + files.map(function(file) { return "\"" + file + "\""; }).join(" ");
102103
var child = child_process.exec(cmd, {
103104
cwd: process.cwd(),
104105
argv0: "node",

0 commit comments

Comments
 (0)