From 8db22b7ff4e58f9e270f48ad98672b800e6fe9df Mon Sep 17 00:00:00 2001 From: zkldi <20380519+zkldi@users.noreply.github.com> Date: Thu, 13 Oct 2022 23:36:48 +0100 Subject: [PATCH] fix: make sure git configuration occurs in a git repo otherwise it will fail. very crazy stuff going on today huh. --- server/src/lib/database-seeds/repo.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/src/lib/database-seeds/repo.ts b/server/src/lib/database-seeds/repo.ts index 9b5741cfa..da3e1318d 100644 --- a/server/src/lib/database-seeds/repo.ts +++ b/server/src/lib/database-seeds/repo.ts @@ -131,13 +131,14 @@ export class DatabaseSeedsRepo { const email = ServerConfig.SEEDS_CONFIG.USER_EMAIL; return ( - asyncExec(`git config user.name "${ServerConfig.SEEDS_CONFIG.USER_NAME}"`) - .then(() => asyncExec(`git config user.email "${email}"`)) + asyncExec(`git config user.name "${ServerConfig.SEEDS_CONFIG.USER_NAME}"`, this.baseDir) + .then(() => asyncExec(`git config user.email "${email}"`, this.baseDir)) // @ereti is insistent that this sleep 1 is fine, so, whatever. .then(() => asyncExec( - `git config credential.helper '!f() { sleep 1; echo "username=\${GIT_USER}"; echo "password=\${GIT_PASSWORD}"; }; f'` + `git config credential.helper '!f() { sleep 1; echo "username=\${GIT_USER}"; echo "password=\${GIT_PASSWORD}"; }; f'`, + this.baseDir ) ) );