Skip to content

Commit 4df78f5

Browse files
committed
escape the spaces in dir for shell command
1 parent f386ab9 commit 4df78f5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lifecycleScripts/configureLibssh2.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
var cp = require("child_process");
22
var path = require("path");
3-
var rooted = path.join.bind(path, __dirname, "..");
3+
var rooted = function (dir) {
4+
var fullPath = path.join(__dirname, "..", dir);
5+
var escapedPathForShell = fullPath.replace(/ /g, "\\ ");
6+
return escapedPathForShell;
7+
};
48

59
module.exports = function retrieveExternalDependencies() {
610
if (process.platform === "win32") {

0 commit comments

Comments
 (0)