Skip to content

Commit

Permalink
Throw on permission errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nayeemrmn committed Dec 20, 2019
1 parent fd78710 commit 5e9719b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cli/js/os.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,10 @@ type DirKind =
export function dir(kind: DirKind): string | null {
try {
return sendSync(dispatch.OP_GET_DIR, { kind });
} catch {
} catch (error) {
if (error.kind == Deno.ErrorKind.PermissionDenied) {
throw error;
}
return null;
}
}
Expand Down

0 comments on commit 5e9719b

Please sign in to comment.