Skip to content

Commit

Permalink
fix(preview): windows spawn error
Browse files Browse the repository at this point in the history
  • Loading branch information
rigor789 committed Aug 22, 2022
1 parent ba8dd58 commit f737579
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/commands/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,13 @@ export class PreviewCommand implements ICommand {

const commandIndex = process.argv.indexOf("preview");
const commandArgs = process.argv.slice(commandIndex + 1);
this.$childProcess.spawn(previewCLIBinPath, commandArgs, {
stdio: "inherit",
});
this.$childProcess.spawn(
process.execPath,
[previewCLIBinPath, ...commandArgs],
{
stdio: "inherit",
}
);
}

async canExecute(args: string[]): Promise<boolean> {
Expand Down

0 comments on commit f737579

Please sign in to comment.