1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-21 21:50:00 -05:00

Fix examples in manual (#2396)

This commit is contained in:
champ 2019-05-23 15:47:11 +08:00 committed by Ryan Dahl
parent 7d03a63ded
commit 1386b6ead5

View file

@ -326,6 +326,7 @@ const { permissions, revokePermission, open, remove } = Deno;
revokePermission("write");
// use the log file
const encoder = new TextEncoder();
await log.write(encoder.encode("hello\n"));
// this will prompt for the write permission or fail.
@ -428,6 +429,7 @@ async function main() {
const p = Deno.run({
args: [
"deno",
"run",
"--allow-read",
"https://deno.land/std/examples/cat.ts",
...fileNames