From c016684653df45c3c3bc88d79dfc295ea5c6426f Mon Sep 17 00:00:00 2001 From: Ry Dahl Date: Tue, 26 Nov 2019 08:06:32 -0800 Subject: refactor: reorganize flags (#3389) - Remove ability to specify run arguments like `--allow-net` after the script argument. It's too hacky to make work with clap. - Remove `--v8-options`, instead use `--v8-flags=--help` - Give more descriptive names to unit tests in flags.rs - Assume argv and subcommand into DenoFlags struct so the output of flags module is only DenoFlags rather than the tuple (subcommand, flags, argv). - Improve CLI help text - Make `deno run` specific args like `--allow-net` only show up in 'deno help run' instead of as global flags in `deno help`. - Removes `deno version` to simplify our implementation and be closer to clap defaults. `deno -V` now only shows Deno's version and not V8's nor TypeScript. `Deno.versions` can be used to see that information. - Prevent clap from auto-detecting terminal width and attempting to wrap text. --- std/http/server_test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'std/http/server_test.ts') diff --git a/std/http/server_test.ts b/std/http/server_test.ts index b9ca14630..30070b272 100644 --- a/std/http/server_test.ts +++ b/std/http/server_test.ts @@ -494,7 +494,7 @@ test({ async fn(): Promise { // Runs a simple server as another process const p = Deno.run({ - args: [Deno.execPath(), "http/testdata/simple_server.ts", "--allow-net"], + args: [Deno.execPath(), "--allow-net", "http/testdata/simple_server.ts"], stdout: "piped" }); @@ -535,9 +535,9 @@ test({ const p = Deno.run({ args: [ Deno.execPath(), - "http/testdata/simple_https_server.ts", "--allow-net", - "--allow-read" + "--allow-read", + "http/testdata/simple_https_server.ts" ], stdout: "piped" }); -- cgit v1.2.3