Merge pull request #30435 from backstage/sennyeya/fix-info-command
fix: info command fails to find module
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Fixes a module not found error when running `backstage-cli info`.
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
import yargs from 'yargs';
|
||||
import { createCliPlugin } from '../../wiring/factory';
|
||||
import { lazy } from '../../lib/lazy';
|
||||
|
||||
export default createCliPlugin({
|
||||
pluginId: 'info',
|
||||
@@ -24,9 +25,7 @@ export default createCliPlugin({
|
||||
description: 'Show helpful information for debugging and reporting bugs',
|
||||
execute: async ({ args }) => {
|
||||
yargs().parse(args);
|
||||
const { default: command } =
|
||||
require('./commands/info') as typeof import('./commands/info');
|
||||
await command();
|
||||
await lazy(() => import('./commands/info'), 'default')(args);
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user