diff --git a/lib/commands/preview.ts b/lib/commands/preview.ts index 5440ee4d81..e4a7487d96 100644 --- a/lib/commands/preview.ts +++ b/lib/commands/preview.ts @@ -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 {