denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
98.28k stars 5.41k forks source link

Improve command line help docs to have more information about permission flags #18685

Open ry opened 1 year ago

ry commented 1 year ago

When I run deno run --help I get a list of all the flags, but the docs are lack luster. There's an opportunity to provide examples and explanation under each of these. While the docs should be terse, it doesn't need to be limited to 5 words.

      --allow-read[=<allow-read>...]
          Allow file system read access

      --allow-write[=<allow-write>...]
          Allow file system write access

      --allow-net[=<allow-net>...]
          Allow network access

      --allow-env[=<allow-env>...]
          Allow environment access

      --allow-sys[=<allow-sys>...]
          Allow access to system info

      --allow-run[=<allow-run>...]
          Allow running subprocesses

      --allow-ffi[=<allow-ffi>...]
          Allow loading dynamic libraries

      --allow-hrtime
          Allow high resolution time measurement
kwhinnery commented 1 year ago

Hey there! Would love to take a crack at fixing this. Before I go too far though, I created a small draft PR with a proposed format for the changes. If that general approach looks good, I'm happy to continue updating the rest of the arguments for deno run (after which it might make sense to look at more arguments across the board).

Thanks!

kwhinnery commented 1 year ago

PR for this is ready for review! https://github.com/denoland/deno/pull/18757