summaryrefslogtreecommitdiff
path: root/cli/js/ops/fs/chmod.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/js/ops/fs/chmod.ts')
-rw-r--r--cli/js/ops/fs/chmod.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/cli/js/ops/fs/chmod.ts b/cli/js/ops/fs/chmod.ts
index 76a3c8f49..a2236935b 100644
--- a/cli/js/ops/fs/chmod.ts
+++ b/cli/js/ops/fs/chmod.ts
@@ -1,13 +1,12 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
+
import { sendSync, sendAsync } from "../dispatch_json.ts";
import { pathFromURL } from "../../util.ts";
export function chmodSync(path: string | URL, mode: number): void {
- path = pathFromURL(path);
- sendSync("op_chmod", { path, mode });
+ sendSync("op_chmod", { path: pathFromURL(path), mode });
}
export async function chmod(path: string | URL, mode: number): Promise<void> {
- path = pathFromURL(path);
- await sendAsync("op_chmod", { path, mode });
+ await sendAsync("op_chmod", { path: pathFromURL(path), mode });
}