Skip to content

Commit cf14a15

Browse files
comewalkfilipesilva
authored andcommitted
fix(@angular/cli): Fix filtering files on completion
Fix #4664 Close #4972
1 parent 5e54a01 commit cf14a15

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

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

+1-1
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;
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)