Merge pull request #30435 from backstage/sennyeya/fix-info-command

fix: info command fails to find module
This commit is contained in:
Patrik Oldsberg
2025-07-08 10:19:44 +02:00
committed by GitHub
2 changed files with 7 additions and 3 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
Fixes a module not found error when running `backstage-cli info`.
+2 -3
View File
@@ -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);
},
});
},