Skip to content

Commit 4909074

Browse files
committed
Resolve null pipes during build in CI
It seems that the spawned node-gyp process' stdout and stderr pipes can be null when installed in a CI environment, which caused the build script to fail. This commit adds null checks to prevent this failure mode.
1 parent d62ccc3 commit 4909074

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

build.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,14 @@ function build() {
9292
return process.exit(err);
9393
}
9494
});
95-
sp.stdout.pipe(process.stdout);
96-
sp.stderr.pipe(process.stderr);
95+
96+
if (sp.stdout) {
97+
sp.stdout.pipe(process.stdout);
98+
}
99+
100+
if (sp.stderr) {
101+
sp.stderr.pipe(process.stderr);
102+
}
97103
}
98104

99105
// Move it to expected location

0 commit comments

Comments
 (0)