Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download progress should be printed to stderr #102

Closed
lowlighter opened this issue Oct 30, 2024 · 1 comment · Fixed by #104
Closed

Download progress should be printed to stderr #102

lowlighter opened this issue Oct 30, 2024 · 1 comment · Fixed by #104

Comments

@lowlighter
Copy link
Contributor

I've already opened an upstream issue about the progress bar lib used (deno-library/progress#30)

The advantage of printing to stderr is that you can use $() (which does not capture stderr) to resolve the allow run path ahead and ensure your actual script only execute with limited permissions:

deno run --allow-run=$(deno eval 'console.log(await import("jsr:@astral/astral").then(_ => _.getBinary("chrome")))') mod.ts

Some other linux command also do this, like wget:

wget https://example.com > /dev/null
--2024-10-30 01:48:05--  https://example.com/
Resolving example.com (example.com)... 93.184.215.14, 2606:2800:21f:cb07:6820:80da:af6b:8b2c
Connecting to example.com (example.com)|93.184.215.14|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1256 (1.2K) [text/html]
Saving to: ‘index.html’

index.html                      100%[=======================================================>]   1.23K  --.-KB/s    in 0s      

2024-10-30 01:48:05 (110 MB/s) - ‘index.html’ saved [1256/1256]
@lino-levan
Copy link
Owner

Sure, that makes sense. I'm supportive. Thanks for opening the issue upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants