[tbb-commits] [Git][tpo/applications/rbm][main] Bug 40067: Use --no-verbose wget option when not running in a terminal

richard (@richard) git at gitlab.torproject.org
Wed Jan 24 12:20:25 UTC 2024



richard pushed to branch main at The Tor Project / Applications / RBM


Commits:
b5e5b04a by Nicolas Vigier at 2024-01-24T10:24:19+01:00
Bug 40067: Use --no-verbose wget option when not running in a terminal

Use the `--no-verbose` option when stdout is not a tty. We avoid setting
the option when `getting_id` is set, in order to have constant
`input_file_id` when `urlget` is being used inside the `exec` script in
`input_files`.

- - - - -


2 changed files:

- doc/options_misc.asc
- lib/RBM/DefaultConfig.pm


Changes:

=====================================
doc/options_misc.asc
=====================================
@@ -21,6 +21,9 @@ abbrev_length::
         This option sets the length of the abbreviated commits, when
         using the +abbrev+ option.
 
+isatty::
+        This option is true when stdout is connected to a tty.
+
 tar::
         Use this options instead of 'tar' in build scripts when you want
         to create deterministic tar files. This options set tar arguments


=====================================
lib/RBM/DefaultConfig.pm
=====================================
@@ -151,6 +151,7 @@ our %default_config = (
     debug         => 0,
     compress_tar  => 'gz',
     version       => "[%- exit_error('No version specified for ' _ project); -%]",
+    isatty        => sub { -t STDOUT },
 ####
 ####
 ####
@@ -577,7 +578,7 @@ set -e
     END;
     -%]
 tmpfile="\$(mktemp -p [% shell_quote(rbm_tmp_dir) %])"
-wget -O"\$tmpfile" [% shell_quote(c("URL")) %]
+wget[% IF !c("getting_id") && !c("isatty") %] --no-verbose[% END %] -O"\$tmpfile" [% shell_quote(c("URL")) %]
 mv -f "\$tmpfile" [% shell_quote(dest_dir _ "/" _ c("filename")) %]
 URLGET
     sig_ext => [ qw(gpg asc sig) ],



View it on GitLab: https://gitlab.torproject.org/tpo/applications/rbm/-/commit/b5e5b04aaf677c4bacfb5ace45598313286bfdf6

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/rbm/-/commit/b5e5b04aaf677c4bacfb5ace45598313286bfdf6
You're receiving this email because of your account on gitlab.torproject.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tbb-commits/attachments/20240124/4afe2eb8/attachment-0001.htm>


More information about the tbb-commits mailing list