Skip to content

Commit

Permalink
fix: add config isFile check
Browse files Browse the repository at this point in the history
  • Loading branch information
Qu4k committed May 24, 2020
1 parent eb033b7 commit 735951e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/args.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export function parseArgs(args: string[] = Deno.args): Args {
version: false,
init: false,
upgrade: false,
config: undefined,
cmd: [],
};

Expand Down
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export function cleanConfig(
*/
export function getConfigFilename(): string | undefined {
return configs.find((filename) => {
return existsSync(filename);
return existsSync(filename) && Deno.statSync(filename).isFile;
});
}

Expand Down

0 comments on commit 735951e

Please sign in to comment.