diff --git a/src/cli/plugin/plugin_lister.js b/src/cli/plugin/plugin_lister.js index 262cc2eb008d8..64b1e17e74a96 100644 --- a/src/cli/plugin/plugin_lister.js +++ b/src/cli/plugin/plugin_lister.js @@ -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); }); }