Skip to content

Commit 8b37217

Browse files
comewalkZhicheng Wang
authored and
Zhicheng Wang
committed
fix(@angular/cli): Fix filtering files on completion
Fix angular#4664 Close angular#4972
1 parent d360359 commit 8b37217

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const CompletionCommand = Command.extend({
7878
commandOptions.all = !commandOptions.bash && !commandOptions.zsh;
7979

8080
const commandFiles = fs.readdirSync(__dirname)
81-
.filter(file => file.match(/\.ts$/) && !file.match(/\.run.ts$/))
81+
.filter(file => file.match(/\.(j|t)s$/) && !file.match(/\.d.ts$/))
8282
.map(file => path.parse(file).name)
8383
.filter(file => {
8484
return commandsToIgnore.indexOf(file) < 0;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import {silentNg} from '../../../utils/process';
2+
3+
4+
export default function() {
5+
return Promise.resolve()
6+
.then(() => silentNg('completion'))
7+
.then(() => process.chdir('/'))
8+
.then(() => silentNg('completion'));
9+
}

0 commit comments

Comments
 (0)