We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cd520c1 commit 3fdd54dCopy full SHA for 3fdd54d
packages/@angular/cli/utilities/app-utils.ts
@@ -1,7 +1,14 @@
1
+const SilentError = require('silent-error');
2
+const chalk = require('chalk');
3
+
4
import { CliConfig } from '../models/config';
5
6
export function getAppFromConfig(nameOrIndex?: String) {
7
const apps: any[] = CliConfig.getValue('apps');
8
+ if (!apps) {
9
+ throw new SilentError(chalk.red('Unable to find any apps in `.angular-cli.json`.'));
10
+ }
11
12
let app = apps[0];
13
if (nameOrIndex) {
14
if (nameOrIndex.match(/^[0-9]+$/)) {
0 commit comments