FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

escape the spaces in dir for shell command · smbera/nodegit@4df78f5 · GitHub

Repository navigation

Commit 4df78f5

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

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)

Back | FazBrowse Home | New Git URL