-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Description
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)
Activity
andyfleming commentedon Oct 20, 2019
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:
ry commentedon Oct 21, 2019
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.
andyfleming commentedon Oct 21, 2019
@ry — That sounds like a better default.
(additional thoughts migrated to #2767)
Add global quiet flag (denoland#3162)
codeflo commentedon Feb 25, 2020
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.Quiet flag: Renaming and improvements (denoland#3162)
bartlomieju commentedon Mar 10, 2020
-q/--quiet
flag was added in 62f4a2a