Skip to content

Commit f737579

Browse files
committed
fix(preview): windows spawn error
1 parent ba8dd58 commit f737579

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/commands/preview.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,13 @@ export class PreviewCommand implements ICommand {
8282

8383
const commandIndex = process.argv.indexOf("preview");
8484
const commandArgs = process.argv.slice(commandIndex + 1);
85-
this.$childProcess.spawn(previewCLIBinPath, commandArgs, {
86-
stdio: "inherit",
87-
});
85+
this.$childProcess.spawn(
86+
process.execPath,
87+
[previewCLIBinPath, ...commandArgs],
88+
{
89+
stdio: "inherit",
90+
}
91+
);
8892
}
8993

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

0 commit comments

Comments
 (0)