diff --git a/Common/Server/Utils/CodeRepository/CodeRepository.ts b/Common/Server/Utils/CodeRepository/CodeRepository.ts index 68677efbed..88b4826915 100644 --- a/Common/Server/Utils/CodeRepository/CodeRepository.ts +++ b/Common/Server/Utils/CodeRepository/CodeRepository.ts @@ -317,7 +317,9 @@ export default class CodeRepositoryUtil { const entries = await LocalFile.readDirectory(totalPath); - return entries.map((entry) => entry.name); + return entries.map((entry) => { + return entry.name; + }); } @CaptureSpan() @@ -440,9 +442,9 @@ export default class CodeRepositoryUtil { targetPath: string, ): string { const root: string = path.resolve(repoPath); - const sanitizedTarget: string = LocalFile.sanitizeFilePath(targetPath).replace( - /^\/+/, "", - ); + const sanitizedTarget: string = LocalFile.sanitizeFilePath( + targetPath, + ).replace(/^\/+/, ""); const absoluteTarget: string = path.resolve(root, sanitizedTarget); if ( diff --git a/Common/Server/Utils/LocalFile.ts b/Common/Server/Utils/LocalFile.ts index 01356681ac..a849e9b7aa 100644 --- a/Common/Server/Utils/LocalFile.ts +++ b/Common/Server/Utils/LocalFile.ts @@ -90,9 +90,7 @@ export default class LocalFile { } @CaptureSpan() - public static async readDirectory( - path: string, - ): Promise> { + public static async readDirectory(path: string): Promise> { return new Promise( ( resolve: (entries: Array) => void,