Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
62 lines (51 loc) · 1.48 KB

File metadata and controls

62 lines (51 loc) · 1.48 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
var buildFlags = require("../utils/buildFlags");
var spawn = require("child_process").spawn;
module.exports = function install() {
console.log("[nodegit] Running install script");
var nodePreGyp = "node-pre-gyp";
if (process.platform === "win32") {
nodePreGyp += ".cmd";
}
var args = ["install"];
if (buildFlags.mustBuild) {
console.info(
"[nodegit] Pre-built download disabled, building from source."
);
args.push("--build-from-source");
if (buildFlags.debugBuild) {
console.info("[nodegit] Building debug version.");
args.push("--debug");
}
}
else {
args.push("--fallback-to-build");
}
return new Promise(function(resolve, reject) {
var spawnedNodePreGyp = spawn(nodePreGyp, args);
spawnedNodePreGyp.stdout.on("data", function(data) {
console.info(data.toString().trim());
});
spawnedNodePreGyp.stderr.on("data", function(data) {
console.error(data.toString().trim());
});
spawnedNodePreGyp.on("close", function(code) {
if (!code) {
resolve();
} else {
reject(code);
}
});
})
.then(function() {
console.info("[nodegit] Completed installation successfully.");
});
};
// Called on the command line
if (require.main === module) {
module.exports()
.catch(function(e) {
console.error("[nodegit] ERROR - Could not finish install");
console.error("[nodegit] ERROR - finished with error code: " + e);
process.exit(e);
});
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.