diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-02-21 10:36:13 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-21 10:36:13 -0500 |
commit | dd8a10948195f231a6a9eb652e3f208813904ad6 (patch) | |
tree | f9a4afeb67bbead882c29c2458a5f1f99e2e42db /cli/js/os.ts | |
parent | d9efb8c02a0036d755c35e8e9c88d58bd45a9e2b (diff) |
refactor: remove unneeded ErrorKinds (#3936)
Diffstat (limited to 'cli/js/os.ts')
-rw-r--r-- | cli/js/os.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/js/os.ts b/cli/js/os.ts index 554d4f78d..275dbdf1d 100644 --- a/cli/js/os.ts +++ b/cli/js/os.ts @@ -1,7 +1,7 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import * as dispatch from "./dispatch.ts"; import { sendSync } from "./dispatch_json.ts"; -import { ErrorKind } from "./errors.ts"; +import { Err } from "./errors.ts"; import * as util from "./util.ts"; /** Check if running in terminal. @@ -193,7 +193,7 @@ export function dir(kind: DirKind): string | null { try { return sendSync(dispatch.OP_GET_DIR, { kind }); } catch (error) { - if (error.kind == ErrorKind.PermissionDenied) { + if (error instanceof Err.PermissionDenied) { throw error; } return null; |