Skip to content

Commit c7ff652

Browse files
committed
fix(@angular/cli): avoid errant migrate message on postinstall
1 parent 4006366 commit c7ff652

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/@angular/cli/bin/ng-update-message.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66

77
const fs = require('fs');
88
const path = require('path');
9+
const os = require('os');
910

1011

1112
let found = false;
1213
let current = path.dirname(path.dirname(__dirname));
1314
while (current !== path.dirname(current)) {
1415
if (fs.existsSync(path.join(current, 'angular-cli.json'))
1516
|| fs.existsSync(path.join(current, '.angular-cli.json'))) {
16-
found = true;
17+
found = os.homedir() !== current || fs.existsSync(path.join(current, 'package.json'));
1718
break;
1819
}
1920
if (fs.existsSync(path.join(current, 'angular.json'))

0 commit comments

Comments
 (0)