diff options
author | Ry Dahl <ry@tinyclouds.org> | 2020-01-09 11:37:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-09 11:37:01 -0700 |
commit | d492c5abe3c7c0716b9695c8a40d0256569d2338 (patch) | |
tree | 15d5d901d3dac3bedefd7258d29a177a2f6ae9a0 /std/manual.md | |
parent | c50cab90a05d271013f741768d70c1eda6ef9a10 (diff) |
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
Diffstat (limited to 'std/manual.md')
-rw-r--r-- | std/manual.md | 4 |
1 files changed, 2 insertions, 2 deletions
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: [ |