Skip to content

Commit 19225ef

Browse files
authored
Merge pull request nodegit#1186 from iloahz/master
escape the spaces in dir for shell command
2 parents b539c6a + 4df78f5 commit 19225ef

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

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)