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 --- packages/server/src/git/misc.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'packages/server/src/git/misc.ts') diff --git a/packages/server/src/git/misc.ts b/packages/server/src/git/misc.ts index da9b1ee..1fda304 100644 --- a/packages/server/src/git/misc.ts +++ b/packages/server/src/git/misc.ts @@ -17,13 +17,13 @@ export async function findAsync(arr: T[], callback: (t: T) => Promise { +export function getFile(git_dir: string, repository: string, file: string): Promise { return new Promise((resolve, reject) => { - readFile(`${base_dir}/${repository}/${file}`, (err, content) => { + readFile(`${git_dir}/${repository}/${file}`, (err, content) => { if(err) { reject(createError(MiscError, 500, "Failed to open repository file " + file)); return; -- cgit v1.2.3-18-g5258