Skip to content

Commit 7b13482

Browse files
author
Christopher Willis-Ford
committed
improve scripts/build-gui.js error reporting, compatibility
1 parent 25597be commit 7b13482

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/build-gui.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
const childProcess = require('child_process');
22
const path = require('path');
33

4-
childProcess.spawnSync(
4+
const child = childProcess.spawnSync(
55
'npm', ['run', 'build'],
66
{
77
cwd: path.join('node_modules', 'scratch-gui'),
88
env: {
9+
...process.env,
910
BUILD_MODE: 'dist',
1011
STATIC_PATH: 'static'
1112
},
1213
shell: true,
1314
stdio: 'inherit'
1415
}
1516
);
17+
18+
if (child.error) throw child.error;
19+
process.exit(child.status);

0 commit comments

Comments
 (0)