Skip to content

Commit

Permalink
Using synch flavor of readdir to bubble up exception
Browse files Browse the repository at this point in the history
Fixes #5920
  • Loading branch information
ycombinator authored and epixa committed Jan 16, 2016
1 parent 9300eda commit 9a0be4e
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/cli/plugin/plugin_lister.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
const fs = require('fs');

export function list(settings, logger) {
fs.readdir(settings.pluginDir, function (err, files) {

files
.filter(function (file) {
return file[0] !== '.';
})
.forEach(function (pluginFile) {
logger.log(pluginFile);
});
const files = fs.readdirSync(settings.pluginDir);
files
.filter(function (file) {
return file[0] !== '.';
})
.forEach(function (pluginFile) {
logger.log(pluginFile);
});
}

0 comments on commit 9a0be4e

Please sign in to comment.