From d5be7f6e0f504781358ff45821b7660241c1d2c6 Mon Sep 17 00:00:00 2001 From: Bsian Date: Wed, 1 Jan 2020 21:39:55 +0000 Subject: [PATCH] Set CWD --- src/commands/pull.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/pull.ts b/src/commands/pull.ts index 4ccdf81..39d7920 100644 --- a/src/commands/pull.ts +++ b/src/commands/pull.ts @@ -20,7 +20,7 @@ export default class Pull extends Command { let pull: string; try { - pull = await this.client.util.exec('git pull'); + pull = await this.client.util.exec('git pull', { cwd: '/var/CloudServices' }); } catch (error) { const updatedMessage = updateMessage.content.replace(`${this.client.stores.emojis.loading} ***Fetching latest commit...***`, `${this.client.stores.emojis.error} ***Could not fetch latest commit***`) .replace(/```$/, `${error.message}\n\`\`\``); @@ -46,7 +46,7 @@ export default class Pull extends Command { let install: string; try { - install = await this.client.util.exec('yarn install'); + install = await this.client.util.exec('yarn install', { cwd: '/var/CloudServices' }); } catch (error) { this.client.updating = false; const updatedMessage = passedPull.content.replace(`${this.client.stores.emojis.loading} ***Reinstalling dependencies...***`, `${this.client.stores.emojis.error} ***Failed to reinstall dependencies***`) @@ -71,7 +71,7 @@ export default class Pull extends Command { let build: string; try { - build = await this.client.util.exec('yarn run build'); + build = await this.client.util.exec('yarn run build', { cwd: '/var/CloudServices' }); } catch (error) { const updatedMessage = updatedPackages.content.replace(`${this.client.stores.emojis.loading} ***Rebuilding files...***`, `${this.client.stores.emojis.error} ***Failed to rebuild files***`) .replace(/```$/, `${error.message}\n\`\`\``);