Skip to content

Commit

Permalink
:feat: Modify command method
Browse files Browse the repository at this point in the history
  • Loading branch information
Khadreal committed Jun 7, 2024
1 parent 0822809 commit ba2f8ba
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions utils/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ async function wp(args: string): Promise<boolean> {
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
Expand Down Expand Up @@ -238,7 +237,7 @@ export async function activatePlugin(name: string): Promise<void> {
* @returns {Promise<void>} - A Promise that resolves when the activation is completed.
*/
export async function checkPluginStatus(name: string): Promise<void> {
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')
}
Expand Down

0 comments on commit ba2f8ba

Please sign in to comment.