Skip to content

Fix postinstall script crash when install location has spaces in its path#1148

Merged
johnhaley81 merged 1 commit into
nodegit:masterfrom
jon-hall:patch-1
Jan 27, 2017
Merged

Fix postinstall script crash when install location has spaces in its path#1148
johnhaley81 merged 1 commit into
nodegit:masterfrom
jon-hall:patch-1

Conversation

@jon-hall

@jon-hall jon-hall commented Oct 14, 2016

Copy link
Copy Markdown
Contributor

After installing nodegit in a directory which had spaces along its path, the postinstall script crashed as a result (Error: Cannot find module 'C:\<path up to the first space>') - wrapping this node call's target in quotes fixes the issue.

}

return exec("node " + path.join(rootPath, "dist/nodegit.js"))
return exec("node \"" + path.join(rootPath, "dist/nodegit.js\""))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like return exec("node \"" + path.join(rootPath, "dist/nodegit.js\"")) should instead be return exec("node \"" + path.join(rootPath, "dist/nodegit.js") + "\"") but this has been open for long enough. I'll fix that in a later PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants