From d41b27f43335cfb1a8ff49aeb121f992332429cf Mon Sep 17 00:00:00 2001 From: HampusM Date: Thu, 12 Aug 2021 15:37:30 +0200 Subject: Cleaned up the settings implementation & renamed base_dir project-wide to git_dir --- test/setup.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test/setup.ts') diff --git a/test/setup.ts b/test/setup.ts index d446296..764c07a 100644 --- a/test/setup.ts +++ b/test/setup.ts @@ -8,17 +8,17 @@ config({ path: "test/test.env" }); const env = process.env as EnvironmentVariables; export default async function(): Promise { - const can_access = await access(env.BASE_DIR) + const can_access = await access(env.GIT_DIR) .then(() => true) .catch(() => false); if(can_access) { - await remove(env.BASE_DIR); + await remove(env.GIT_DIR); } - await mkdir(env.BASE_DIR); + await mkdir(env.GIT_DIR); - const repository = await Clone.clone(env.AVAIL_REPO_URL, `${env.BASE_DIR}/${env.AVAIL_REPO}`, { bare: 1 }); + const repository = await Clone.clone(env.AVAIL_REPO_URL, `${env.GIT_DIR}/${env.AVAIL_REPO}`, { bare: 1 }); const config = await repository.config(); await config.setString("user.name", "BobDylan"); @@ -27,5 +27,5 @@ export default async function(): Promise { await repository.fetchAll(); await repository.createTag((await repository.getMasterCommit()).id(), "1.2", "Fixed stuff"); - await writeFile(`${env.BASE_DIR}/${env.AVAIL_REPO}/owner`, "Bob"); + await writeFile(`${env.GIT_DIR}/${env.AVAIL_REPO}/owner`, "Bob"); } \ No newline at end of file -- cgit v1.2.3-18-g5258