Skip to content

Commit

Permalink
fix: properly fix help command
Browse files Browse the repository at this point in the history
  • Loading branch information
Timeraa committed Oct 4, 2024
1 parent 1f76ce1 commit 821ca74
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/.vitepress/loaders/cli.data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,15 @@ export default {
};

async function getHelp(command: string): Promise<string> {
const res = await spawn('pnpm', [command, '--help'], {
const args = command.split(' ');
const res = await spawn(args[0], [...args.slice(1), '--help'], {
cwd: 'packages/wxt',
});
return res.stdout;
}

function getWxtHelp(command: string): Promise<string> {
return getHelp(`-s wxt ${command}`.trim());
return getHelp(`pnpm -s wxt ${command}`.trim());
}

async function getPublishExtensionHelp(command: string): Promise<string> {
Expand Down

0 comments on commit 821ca74

Please sign in to comment.