From ba2f8ba9af27619ffdccc12c0ffe14dd3032a71f Mon Sep 17 00:00:00 2001 From: Opeyemi Ibrahim Date: Fri, 7 Jun 2024 17:15:08 +0100 Subject: [PATCH] :feat: Modify command method --- utils/commands.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/utils/commands.ts b/utils/commands.ts index d3ad327..df552d0 100644 --- a/utils/commands.ts +++ b/utils/commands.ts @@ -54,7 +54,6 @@ async function wp(args: string): Promise { privateKeyPath: configurations.ssh.key }) const result = await client.execCommand(`wp ${args}${root} --path=${cwd}`); - if(result.code === 1) { console.error('Error :', result.stderr); return false @@ -238,7 +237,7 @@ export async function activatePlugin(name: string): Promise { * @returns {Promise} - A Promise that resolves when the activation is completed. */ export async function checkPluginStatus(name: string): Promise { - const status = await wp(`plugin is-active ${name}`) + const status: boolean = await wp(`plugin is-active ${name}`); if(!status) { throw new Error('Plugin is not active') }