Sometimes (a lot of the time) running the same program twice and getting different outputs is highly undesirable. But this happens regularly with Deno programs due to the
Compiling file:///path/to/file.ts
info message which gets outputted to stderr when a file is compiled when running a program.
A way to silence these messages would be very useful.
So the idea is to implement a quiet (-q, --quiet) or silent (-s, --silent) command line flag, (personally I like the quiet naming better) which would prevent these info messages from being outputted. Additionally I think it would be reasonable for this flag to imply the behavior of --no-prompt, though I'm unsure about what's happening with that flag (See #2767), but automatically denying permissions queries is very useful in the same vein as silencing the compiling info message, so merging the functionality in to a single flag seems reasonable.
(This flag wouldn't generally be used directly on the command line, but instead in placed where deno programs are called by another program)
One use case where I imagine this being useful would be in a docker deployment.
--no-fetch. (This would be a useful tool for ensuring a deterministic build. Bundling may also help address this use case.)I'd basically imagine running with:
deno --quiet --no-prompt --no-fetch
Sure, sounds like a reasonable feature.
Tangental: @andyfleming - I want to remove --no-prompt - scripts are going to just die if they don't have the correct permissions rather than giving a prompt.
@ry — That sounds like a better default.
(additional thoughts migrated to #2767)
IMO, this makes most sense as a global flag, i.e. not scoped to the run command. deno test already has an (unused) -q/--quiet flag that can be repurposed for this. The PR I added shows this approach.
-q/--quiet flag was added in 62f4a2a788a46af88e47472738d1a98fa247b9b0
Most helpful comment
-q/--quietflag was added in 62f4a2a788a46af88e47472738d1a98fa247b9b0