Skip to content

Commit

Permalink
fix(@angular/cli): Fix filtering files on completion
Browse files Browse the repository at this point in the history
  • Loading branch information
comewalk authored and Zhicheng Wang committed Mar 16, 2017
1 parent d360359 commit 8b37217
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@angular/cli/commands/completion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const CompletionCommand = Command.extend({
commandOptions.all = !commandOptions.bash && !commandOptions.zsh;

const commandFiles = fs.readdirSync(__dirname)
.filter(file => file.match(/\.ts$/) && !file.match(/\.run.ts$/))
.filter(file => file.match(/\.(j|t)s$/) && !file.match(/\.d.ts$/))
.map(file => path.parse(file).name)
.filter(file => {
return commandsToIgnore.indexOf(file) < 0;
Expand Down
9 changes: 9 additions & 0 deletions tests/e2e/tests/commands/completion/completion.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import {silentNg} from '../../../utils/process';


export default function() {
return Promise.resolve()
.then(() => silentNg('completion'))
.then(() => process.chdir('/'))
.then(() => silentNg('completion'));
}

0 comments on commit 8b37217

Please sign in to comment.