From d492c5abe3c7c0716b9695c8a40d0256569d2338 Mon Sep 17 00:00:00 2001 From: Ry Dahl Date: Thu, 9 Jan 2020 11:37:01 -0700 Subject: feat: Deno.args now does not include script (#3628) Previously Deno.args was ["script.js", "arg1", "arg2"] Now it is just ["arg1", "arg2"] BREAKING CHANGE --- std/manual.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'std/manual.md') diff --git a/std/manual.md b/std/manual.md index b09ce9364..a92e45c26 100644 --- a/std/manual.md +++ b/std/manual.md @@ -193,7 +193,7 @@ In this program each command-line argument is assumed to be a filename, the file is opened, and printed to stdout. ```ts -for (let i = 1; i < Deno.args.length; i++) { +for (let i = 0; i < Deno.args.length; i++) { let filename = Deno.args[i]; let file = await Deno.open(filename); await Deno.copy(Deno.stdout, file); @@ -386,7 +386,7 @@ By default when you use `Deno.run()` subprocess inherits `stdin`, `stdout` and you can use `"piped"` option. ```ts -const fileNames = Deno.args.slice(1); +const fileNames = Deno.args; const p = Deno.run({ args: [ -- cgit v1.2.3