Skip to content

Commit

Permalink
CLI: Get node executable path from process.execPath (#1018)
Browse files Browse the repository at this point in the history
  • Loading branch information
kellycampbell authored and dcodeIO committed Apr 30, 2018
1 parent a927a66 commit 65d113b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cli/pbts.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ exports.main = function(args, callback) {
// There is no proper API for jsdoc, so this executes the CLI and pipes the output
var basedir = path.join(__dirname, ".");
var moduleName = argv.name || "null";
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(" ");
var nodePath = process.execPath;
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(" ");
var child = child_process.exec(cmd, {
cwd: process.cwd(),
argv0: "node",
Expand Down

0 comments on commit 65d113b

Please sign in to comment.