From 5d5349d42807ebc9a601ded11b1101dc46e4ac44 Mon Sep 17 00:00:00 2001 From: Dmytro Hryshyn Date: Wed, 10 Jan 2024 14:03:23 +0200 Subject: [PATCH] prettier --- src/components/engineService.ts | 37 +++++++++++++++------------------ 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/src/components/engineService.ts b/src/components/engineService.ts index 131c52ad..3c3744a3 100644 --- a/src/components/engineService.ts +++ b/src/components/engineService.ts @@ -249,7 +249,9 @@ export class EngineService { throw new Error('The engines are not bootstrapped.'); } - return process.platform !== 'win32' ? singleQuotify(this.__codemodEngineNodeExecutableUri.fsPath) : this.__codemodEngineNodeExecutableUri.fsPath; + return process.platform !== 'win32' + ? singleQuotify(this.__codemodEngineNodeExecutableUri.fsPath) + : this.__codemodEngineNodeExecutableUri.fsPath; } private __getCodemodEngineRustExecutableCommand() { @@ -257,19 +259,18 @@ export class EngineService { throw new Error('The engines are not bootstrapped.'); } - return process.platform !== 'win32' ? singleQuotify(this.__codemodEngineRustExecutableUri.fsPath) : this.__codemodEngineRustExecutableUri.fsPath; + return process.platform !== 'win32' + ? singleQuotify(this.__codemodEngineRustExecutableUri.fsPath) + : this.__codemodEngineRustExecutableUri.fsPath; } - public isEngineBootstrapped() { return this.__codemodEngineNodeExecutableUri !== null; } public async syncRegistry(): Promise { - - const childProcess = spawn( - this.__getCodemodEngineNodeExecutableCommand(), + this.__getCodemodEngineNodeExecutableCommand(), ['syncRegistry'], { stdio: 'pipe', @@ -517,7 +518,6 @@ export class EngineService { async #onExecuteCodemodSetMessage( message: Message & { kind: MessageKind.executeCodemodSet }, ) { - if (this.#execution) { if (message.command.kind === 'executeCodemod') { this.__executionMessageQueue.push( @@ -565,19 +565,16 @@ export class EngineService { message, storageUri, ); - - const executableCommand = message.command.kind === 'executePiranhaRule' - ? this.__getCodemodEngineNodeExecutableCommand() - : this.__getCodemodEngineRustExecutableCommand() - - const childProcess = spawn( - executableCommand, - args, - { - stdio: 'pipe', - shell: true, - }, - ); + + const executableCommand = + message.command.kind === 'executePiranhaRule' + ? this.__getCodemodEngineNodeExecutableCommand() + : this.__getCodemodEngineRustExecutableCommand(); + + const childProcess = spawn(executableCommand, args, { + stdio: 'pipe', + shell: true, + }); this.__store.dispatch( actions.setCaseHashInProgress(message.caseHashDigest),