Set CWD
parent
41f42c2f9d
commit
d5be7f6e0f
|
@ -20,7 +20,7 @@ export default class Pull extends Command {
|
||||||
let pull: string;
|
let pull: string;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
pull = await this.client.util.exec('git pull');
|
pull = await this.client.util.exec('git pull', { cwd: '/var/CloudServices' });
|
||||||
} catch (error) {
|
} 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***`)
|
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\`\`\``);
|
.replace(/```$/, `${error.message}\n\`\`\``);
|
||||||
|
@ -46,7 +46,7 @@ export default class Pull extends Command {
|
||||||
|
|
||||||
let install: string;
|
let install: string;
|
||||||
try {
|
try {
|
||||||
install = await this.client.util.exec('yarn install');
|
install = await this.client.util.exec('yarn install', { cwd: '/var/CloudServices' });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.client.updating = false;
|
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***`)
|
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;
|
let build: string;
|
||||||
try {
|
try {
|
||||||
build = await this.client.util.exec('yarn run build');
|
build = await this.client.util.exec('yarn run build', { cwd: '/var/CloudServices' });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
const updatedMessage = updatedPackages.content.replace(`${this.client.stores.emojis.loading} ***Rebuilding files...***`, `${this.client.stores.emojis.error} ***Failed to rebuild files***`)
|
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\`\`\``);
|
.replace(/```$/, `${error.message}\n\`\`\``);
|
||||||
|
|
Loading…
Reference in New Issue