cli: fix for error output being ignored
This commit is contained in:
@@ -17,7 +17,10 @@ export default async (cmd: Command) => {
|
||||
}
|
||||
|
||||
try {
|
||||
spawnSync('tsc', args, { stdio: 'inherit' });
|
||||
const result = spawnSync('tsc', args, { stdio: 'inherit' });
|
||||
if (result.error) {
|
||||
throw result.error;
|
||||
}
|
||||
} catch (error) {
|
||||
process.stderr.write(`${chalk.red(error.message)}\n`);
|
||||
process.exit(1);
|
||||
|
||||
@@ -5,7 +5,10 @@ export default async () => {
|
||||
const args = ['lint'];
|
||||
|
||||
try {
|
||||
spawnSync('web-scripts', args, { stdio: 'inherit' });
|
||||
const result = spawnSync('web-scripts', args, { stdio: 'inherit' });
|
||||
if (result.error) {
|
||||
throw result.error;
|
||||
}
|
||||
} catch (error) {
|
||||
process.stderr.write(`${chalk.red(error.message)}\n`);
|
||||
process.exit(1);
|
||||
|
||||
@@ -10,7 +10,10 @@ export default async (cmd: Command) => {
|
||||
}
|
||||
|
||||
try {
|
||||
spawnSync('web-scripts', args, { stdio: 'inherit' });
|
||||
const result = spawnSync('web-scripts', args, { stdio: 'inherit' });
|
||||
if (result.error) {
|
||||
throw result.error;
|
||||
}
|
||||
} catch (error) {
|
||||
process.stderr.write(`${chalk.red(error.message)}\n`);
|
||||
process.exit(1);
|
||||
|
||||
Reference in New Issue
Block a user