From fe7e3a12ca02792215f7598302c42113bcdc4458 Mon Sep 17 00:00:00 2001 From: Asher Gomez Date: Thu, 24 Nov 2022 14:00:31 +1100 Subject: feat(cli): add warning for incorrectly ordered flags (#16734) This code checks if permission flags are incorrectly defined after the module name (e.g. `deno run mod.ts --allow-read` instead of the correct `deno run --allow-read mod.ts`). If so, a simple warning is displayed. --- cli/tests/testdata/run/permission_args.out | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 cli/tests/testdata/run/permission_args.out (limited to 'cli/tests/testdata') diff --git a/cli/tests/testdata/run/permission_args.out b/cli/tests/testdata/run/permission_args.out new file mode 100644 index 000000000..6a1e1787c --- /dev/null +++ b/cli/tests/testdata/run/permission_args.out @@ -0,0 +1,4 @@ +Permission flags have likely been incorrectly set after the script argument. +To grant permissions, set them before the script argument. For example: + deno run --allow-read=. main.js +Hello World -- cgit v1.2.3