fix: make sure git configuration occurs in a git repo

otherwise it will fail. very crazy stuff going on today huh.
This commit is contained in:
zkldi
2022-10-14 00:04:34 +01:00
parent de3cc0fd11
commit 8db22b7ff4
+4 -3
View File
@@ -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
)
)
);