Skip to content

Commit c012aa7

Browse files
committed
feat(@angular/cli): allow override of configuration for ng run
closes #10569
1 parent d173253 commit c012aa7

File tree

1 file changed

+6
-1
lines changed
  • packages/@angular/cli/commands

1 file changed

+6
-1
lines changed

packages/@angular/cli/commands/run.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { ArchitectCommand } from '../models/architect-command';
33

44
export interface RunOptions {
55
target: string;
6+
configuration?: string;
67
}
78

89
export default class RunCommand extends ArchitectCommand {
@@ -16,9 +17,13 @@ export default class RunCommand extends ArchitectCommand {
1617

1718
public async run(options: RunOptions) {
1819
if (options.target) {
19-
const [project, target, configuration] = options.target.split(':');
20+
let [project, target, configuration] = options.target.split(':');
2021
const overrides = { ...options };
2122
delete overrides.target;
23+
if (overrides.configuration) {
24+
configuration = overrides.configuration;
25+
delete overrides.configuration;
26+
}
2227
return this.runArchitectTarget({
2328
project,
2429
target,

0 commit comments

Comments
 (0)