mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
gpgtar: Use log-file from common.conf only in --batch mode.
* tools/gpgtar.c (main): Do it. -- This makes the interactive use of gpgtar more convenient and is more aligned to what gpg and gpgsm do.
This commit is contained in:
parent
8359f2e498
commit
b389e04ef5
@ -2060,7 +2060,8 @@ implemented.
|
|||||||
@item --batch
|
@item --batch
|
||||||
@opindex batch
|
@opindex batch
|
||||||
Use batch mode. Never ask but use the default action. This option is
|
Use batch mode. Never ask but use the default action. This option is
|
||||||
passed directly to @command{gpg}.
|
passed directly to @command{gpg}. This option is also required to
|
||||||
|
activate the @option{log-file} in @file{common.conf} for this program.
|
||||||
|
|
||||||
@item --yes
|
@item --yes
|
||||||
@opindex yes
|
@opindex yes
|
||||||
|
@ -496,8 +496,11 @@ main (int argc, char **argv)
|
|||||||
if (log_get_errorcount (0))
|
if (log_get_errorcount (0))
|
||||||
exit (2);
|
exit (2);
|
||||||
|
|
||||||
/* Get a log file from common.conf. */
|
/* Get a log file from common.conf but use it only in --batch mode
|
||||||
if (!parse_comopt (GNUPG_MODULE_NAME_GPGTAR, any_debug) && comopt.logfile)
|
* because people expect to see the verbose output here even if they
|
||||||
|
* have a log-file in their common.conf. */
|
||||||
|
if (!parse_comopt (GNUPG_MODULE_NAME_GPGTAR, any_debug) && comopt.logfile
|
||||||
|
&& opt.batch)
|
||||||
log_set_file (comopt.logfile);
|
log_set_file (comopt.logfile);
|
||||||
|
|
||||||
/* Print a warning if an argument looks like an option. */
|
/* Print a warning if an argument looks like an option. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user