diff options
author | Asher Gomez <ashersaupingomez@gmail.com> | 2022-11-24 14:00:31 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-24 03:00:31 +0000 |
commit | fe7e3a12ca02792215f7598302c42113bcdc4458 (patch) | |
tree | 1bea37db723f77c96eec000ece5c738ab6f0eef8 /cli/tests/testdata/run | |
parent | beaa0d88679c96e643f411d04a4ce9f6d159eaeb (diff) |
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.
Diffstat (limited to 'cli/tests/testdata/run')
-rw-r--r-- | cli/tests/testdata/run/permission_args.out | 4 |
1 files changed, 4 insertions, 0 deletions
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 |