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

Don't fail yarn installs when we can't find npm by implausible · Pull Request #1644 · nodegit/nodegit · GitHub

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .js  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
22 changes: 15 additions & 7 deletions lifecycleScripts/preinstall.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,22 @@ module.exports = function prepareForBuild() {
console.log("[nodegit] Running pre-install script");

return exec("npm -v")
.then(function(npmVersion) {
if (npmVersion.split(".")[0] < 3) {
console.log("[nodegit] npm@2 installed, pre-loading required packages");
return exec("npm install --ignore-scripts");
}
.then(
function(npmVersion) {
if (npmVersion.split(".")[0] < 3) {
console.log(
"[nodegit] npm@2 installed, pre-loading required packages"
);
return exec("npm install --ignore-scripts");
}

return Promise.resolve();
})
return Promise.resolve();
},
function() {
// We're installing via yarn, so don't
// care about compability with npm@2
}
)
.then(function() {
if (buildFlags.isGitRepo) {
var submodules = require(local("submodules"));
Expand Down

Back | FazBrowse Home | New Git URL