diff options
author | HampusM <hampus@hampusmat.com> | 2021-08-12 15:37:30 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2021-08-12 15:37:30 +0200 |
commit | d41b27f43335cfb1a8ff49aeb121f992332429cf (patch) | |
tree | 93b6e1ec9b292c3d80ee1a538d0e729612148052 /packages/server/src/git/misc.ts | |
parent | 30f0b2ee1f494be1786280040fb47ec18bde8a6d (diff) |
Cleaned up the settings implementation & renamed base_dir project-wide to git_dir
Diffstat (limited to 'packages/server/src/git/misc.ts')
-rw-r--r-- | packages/server/src/git/misc.ts | 6 |
1 files changed, 3 insertions, 3 deletions
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<T>(arr: T[], callback: (t: T) => Promise<boolean /** * Returns the content of a file inside a repository * - * @param base_dir - The directory which the repository is in + * @param git_dir - The directory which the repository is in * @param repository - The directory of a bare repository * @param file - The path of a file */ -export function getFile(base_dir: string, repository: string, file: string): Promise<string> { +export function getFile(git_dir: string, repository: string, file: string): Promise<string> { 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; |