diff --git a/src/components/bootstrapExecutablesService.ts b/src/components/bootstrapExecutablesService.ts index 9eaac005..dfb3c906 100644 --- a/src/components/bootstrapExecutablesService.ts +++ b/src/components/bootstrapExecutablesService.ts @@ -65,11 +65,15 @@ export class BootstrapExecutablesService { return executableUri; } - private async __bootstrapCodemodEngineRustExecutableUri(): Promise { + private async __bootstrapCodemodEngineRustExecutableUri(): Promise { const platform = process.platform === 'darwin' ? 'macos' : encodeURIComponent(process.platform); + + if(platform === 'win32') { + return null; + } const executableBaseName = `codemod-engine-rust-${platform}`; diff --git a/src/components/engineService.ts b/src/components/engineService.ts index 131c52ad..e47709d7 100644 --- a/src/components/engineService.ts +++ b/src/components/engineService.ts @@ -565,11 +565,11 @@ export class EngineService { message, storageUri, ); + const executableCommand = message.command.kind === 'executePiranhaRule' - ? this.__getCodemodEngineNodeExecutableCommand() - : this.__getCodemodEngineRustExecutableCommand() - + ? this.__getCodemodEngineRustExecutableCommand() + : this.__getCodemodEngineNodeExecutableCommand() const childProcess = spawn( executableCommand, args, diff --git a/src/components/messageBus.ts b/src/components/messageBus.ts index 9625a850..b84f6020 100644 --- a/src/components/messageBus.ts +++ b/src/components/messageBus.ts @@ -112,7 +112,7 @@ export type Message = | Readonly<{ kind: MessageKind.engineBootstrapped; codemodEngineNodeExecutableUri: Uri; - codemodEngineRustExecutableUri: Uri; + codemodEngineRustExecutableUri: Uri | null; }> | Readonly<{ kind: MessageKind.executeCodemodSet;