Skip to content

Commit f670b8b

Browse files
committed
don't fail on non-number exit codes
1 parent 171cfde commit f670b8b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

packages/@angular/cli/ember-cli/lib/cli/cli.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ class CLI {
9595
};
9696

9797
try {
98-
const success = await runCommand(environment.commands, environment.cliArgs, logger, context);
99-
return success ? 0 : 1;
98+
const maybeExitCode = await runCommand(environment.commands, environment.cliArgs, logger, context);
99+
return Number.isInteger(maybeExitCode) ? maybeExitCode : 0;
100100
} catch (err) {
101101
if (err) {
102102
const msg = typeof err === 'string' ? err : err.message;

packages/@angular/cli/models/architect-command.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ export abstract class ArchitectCommand extends Command {
4747
}))
4848
.toPromise()
4949
.then((schema) => this.mapArchitectOptions(schema))
50-
.then(() => {});
50+
.then(() => { });
5151
}
5252

5353
protected mapArchitectOptions(schema: any) {
5454
const properties = schema.properties;
5555
const keys = Object.keys(properties);
5656
keys
57-
.map(key => ({...properties[key], ...{name: stringUtils.dasherize(key)}}))
57+
.map(key => ({ ...properties[key], ...{ name: stringUtils.dasherize(key) } }))
5858
.map(opt => {
5959
let type;
6060
const schematicType = opt.type;
@@ -111,15 +111,15 @@ export abstract class ArchitectCommand extends Command {
111111
aliases: ['c']
112112
};
113113

114-
protected async runArchitect(options: RunArchitectOptions): Promise<boolean> {
114+
protected async runArchitect(options: RunArchitectOptions): Promise<number> {
115115
const runOptions: RunOptions = {
116116
target: this.target,
117117
root: this.project.root,
118118
...options
119119
};
120120
const buildResult = await run(runOptions).toPromise();
121121

122-
return buildResult.success;
122+
return buildResult.success ? 0 : 1;
123123
}
124124
}
125125

0 commit comments

Comments
 (0)