mirror of
https://github.com/scratchfoundation/scratch-desktop.git
synced 2024-12-23 06:02:30 -05:00
improve scripts/build-gui.js error reporting, compatibility
This commit is contained in:
parent
25597be1f8
commit
7b13482bc6
1 changed files with 5 additions and 1 deletions
|
@ -1,11 +1,12 @@
|
||||||
const childProcess = require('child_process');
|
const childProcess = require('child_process');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
childProcess.spawnSync(
|
const child = childProcess.spawnSync(
|
||||||
'npm', ['run', 'build'],
|
'npm', ['run', 'build'],
|
||||||
{
|
{
|
||||||
cwd: path.join('node_modules', 'scratch-gui'),
|
cwd: path.join('node_modules', 'scratch-gui'),
|
||||||
env: {
|
env: {
|
||||||
|
...process.env,
|
||||||
BUILD_MODE: 'dist',
|
BUILD_MODE: 'dist',
|
||||||
STATIC_PATH: 'static'
|
STATIC_PATH: 'static'
|
||||||
},
|
},
|
||||||
|
@ -13,3 +14,6 @@ childProcess.spawnSync(
|
||||||
stdio: 'inherit'
|
stdio: 'inherit'
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (child.error) throw child.error;
|
||||||
|
process.exit(child.status);
|
||||||
|
|
Loading…
Reference in a new issue