Skip to content

Commit

Permalink
fix: show exact package name while prompting for installation
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesgeorge007 committed Jan 9, 2021
1 parent 767fe6b commit 2635a0d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/webpack-cli/lib/webpack-cli.js
Expand Up @@ -357,7 +357,8 @@ class WebpackCLI {

try {
pkg = await promptInstallation(pkg, () => {
logger.error(`For using this command you need to install: '${green(commandName)}' package`);
const pkgName = pkg.includes('@webpack') ? pkg.slice(pkg.indexOf('/') + 1) : pkg;
logger.error(`For using this command you need to install: '${green(pkgName)}' package`);
});
} catch (error) {
logger.error(`Action Interrupted, use '${cyan('webpack-cli help')}' to see possible commands`);
Expand Down

0 comments on commit 2635a0d

Please sign in to comment.