Skip to content

Commit d7ef005

Browse files
committed
rename
1 parent fadb8bb commit d7ef005

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

scripts/install.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// old compiler.ml
1212
// This will be run in npm postinstall, don't use too fancy features here
1313

14-
var cp = require("child_process");
14+
var child_process = require("child_process");
1515
var fs = require("fs");
1616
var path = require("path");
1717
var root_dir = path.join(__dirname, "..");
@@ -44,13 +44,13 @@ function provideNinja() {
4444
console.log(`building ninja`);
4545
ensureExists(ninja_source_dir);
4646
if (fs.existsSync(path.join(root_dir, "vendor", "ninja.tar.gz"))) {
47-
cp.execSync(`tar xzvf ../ninja.tar.gz`, {
47+
child_process.execSync(`tar xzvf ../ninja.tar.gz`, {
4848
cwd: ninja_source_dir,
4949
stdio: [0, 1, 2],
5050
});
5151
console.log("No prebuilt Ninja, building Ninja now");
5252
var build_ninja_command = "./configure.py --bootstrap";
53-
cp.execSync(build_ninja_command, {
53+
child_process.execSync(build_ninja_command, {
5454
cwd: ninja_source_dir,
5555
stdio: [0, 1, 2],
5656
});
@@ -72,7 +72,7 @@ function provideNinja() {
7272
function test_ninja_compatible(binary_path) {
7373
var version;
7474
try {
75-
version = cp
75+
version = child_process
7676
.execSync(JSON.stringify(binary_path) + " --version", {
7777
encoding: "utf8",
7878
stdio: ["pipe", "pipe", "ignore"], // execSync outputs to stdout even if we catch the error. Silent it here
@@ -120,7 +120,7 @@ function checkPrebuiltBscCompiler() {
120120
}
121121
try {
122122
var version = String(
123-
cp.execFileSync(path.join(bin_path, "bsc.exe"), ["-v"])
123+
child_process.execFileSync(path.join(bin_path, "bsc.exe"), ["-v"])
124124
);
125125

126126
var myOCamlVersion = version.substr(
@@ -160,13 +160,13 @@ o all: phony runtime others $stdlib
160160
var filePath = path.join(jscomp_dir, "release.ninja");
161161
fs.writeFileSync(filePath, releaseNinja, "ascii");
162162
var cleanArgs = ["-f", "release.ninja", "-t", "clean"];
163-
cp.execFileSync(ninja_bin_output, cleanArgs, {
163+
child_process.execFileSync(ninja_bin_output, cleanArgs, {
164164
cwd: jscomp_dir,
165165
stdio: [0, 1, 2],
166166
shell: false,
167167
});
168168
var buildArgs = ["-f", "release.ninja", "--verbose", "-k", "1"];
169-
cp.execFileSync(ninja_bin_output, buildArgs, {
169+
child_process.execFileSync(ninja_bin_output, buildArgs, {
170170
cwd: jscomp_dir,
171171
stdio: [0, 1, 2],
172172
shell: false,
@@ -210,11 +210,11 @@ function provideCompiler() {
210210

211211
var filePath = path.join(lib_dir, "release.ninja");
212212
fs.writeFileSync(filePath, releaseNinja, "ascii");
213-
cp.execFileSync(ninja_bin_output, ["-f", "release.ninja", "-t", "clean"], {
213+
child_process.execFileSync(ninja_bin_output, ["-f", "release.ninja", "-t", "clean"], {
214214
cwd: lib_dir,
215215
stdio: [0, 1, 2],
216216
});
217-
cp.execFileSync(ninja_bin_output, ["-f", "release.ninja", "-v"], {
217+
child_process.execFileSync(ninja_bin_output, ["-f", "release.ninja", "-v"], {
218218
cwd: lib_dir,
219219
stdio: [0, 1, 2],
220220
});

0 commit comments

Comments
 (0)