Skip to content

Commit

Permalink
refactor(utils): ♻️ update ensureDirectoryAccess function
Browse files Browse the repository at this point in the history
-    Add missing comma in function parameter
  • Loading branch information
navin-moorthy committed Jul 12, 2023
1 parent c16cb06 commit b67978e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils/ensureDirectoryAccess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ import { throwError } from "./throwError.js";
* @throws {Error} If the directory does not exist or is not accessible.
*/
export async function ensureDirectoryAccess(
directoryPath: string
directoryPath: string,
): Promise<void> {
try {
await fs.access(
directoryPath,
// eslint-disable-next-line no-bitwise
fsSync.constants.F_OK | fsSync.constants.W_OK | fsSync.constants.R_OK
fsSync.constants.F_OK | fsSync.constants.W_OK | fsSync.constants.R_OK,
);
} catch {
try {
Expand All @@ -27,7 +27,7 @@ export async function ensureDirectoryAccess(
} catch (error) {
throwError(
error,
`${directoryPath} does not exists / writable / readable in ensureDirectoryAccess function`
`${directoryPath} does not exists / writable / readable in ensureDirectoryAccess function`,
);
}
}
Expand Down

0 comments on commit b67978e

Please sign in to comment.