We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 076db79 commit 4a042f3Copy full SHA for 4a042f3
packages/angular-cli/upgrade/version.ts
@@ -76,6 +76,11 @@ export class Version {
76
77
78
const configPath = CliConfig.configFilePath();
79
+
80
+ if (configPath === null) {
81
+ return new Version(null);
82
+ }
83
84
const configJson = readFileSync(configPath, 'utf8');
85
86
try {
tests/e2e/tests/misc/version.ts
@@ -0,0 +1,10 @@
1
+import {deleteFile} from '../../utils/fs';
2
+import {ng} from '../../utils/process';
3
4
5
+export default function() {
6
+ return ng('version')
7
+ .then(() => deleteFile('angular-cli.json'))
8
+ // doesn't fail on a project with missing angular-cli.json
9
+ .then(() => ng('version'));
10
+}
0 commit comments