Commit 90f8b05 1 parent 5b5d79b commit 90f8b05 Copy full SHA for 90f8b05
File tree 3 files changed +17
-3
lines changed
3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ use Sympa::Template;
41
41
use Sympa::Tools::Data;
42
42
43
43
my $language = Sympa::Language-> instance;
44
+ my $noout ;
44
45
45
46
sub run {
46
47
my $class = shift ;
@@ -113,7 +114,7 @@ sub run {
113
114
} elsif (
114
115
not Getopt::Long::GetOptionsFromArray(
115
116
\@argv , \%options ,
116
- qw( config|f=s debug|d lang|l=s log_level=s mail|m) ,
117
+ qw( config|f=s debug|d lang|l=s log_level=s mail|m noout ) ,
117
118
$class -> _options
118
119
)
119
120
) {
@@ -124,6 +125,8 @@ sub run {
124
125
return undef ;
125
126
}
126
127
128
+ $noout = $options {noout };
129
+
127
130
# Get privileges and load config if necessary.
128
131
# Otherwise only setup language if specified.
129
132
$language -> set_lang($options {lang }) if $options {lang };
@@ -406,7 +409,9 @@ sub _translate_warn {
406
409
return $output ;
407
410
}
408
411
409
- $SIG {__WARN__ } = sub { warn _translate_warn(shift ) };
412
+ $SIG {__WARN__ } = sub {
413
+ warn _translate_warn(shift ) unless $noout ;
414
+ };
410
415
411
416
my $arg_labels = {
412
417
list => {gettext_id => ' list' },
Original file line number Diff line number Diff line change @@ -65,7 +65,10 @@ sub _run {
65
65
only_changed => 1,
66
66
filter => ([@{$options -> {output } // []}, qw( explicit mandatory) ])
67
67
);
68
- return 1 unless defined $out ;
68
+ unless (defined $out ) {
69
+ warn " Not changed.\n " ;
70
+ return 1;
71
+ }
69
72
70
73
my $sympa_conf = Sympa::Constants::CONFIG();
71
74
my $date = POSIX::strftime(' %Y%m%d%H%M%S' , localtime time );
Original file line number Diff line number Diff line change @@ -281,6 +281,10 @@ Sets Sympa log level.
281
281
282
282
Enable SMTP logging.
283
283
284
+ =item C<--noout >
285
+
286
+ Skip output to the console except for fatal error messages.
287
+
284
288
=back
285
289
286
290
=head1 COMMANDS
@@ -921,4 +925,6 @@ F<sympa_msg.pl> daemon.
921
925
As of Sympa 6.2.68, F<sympa.pl> was renamed to F<sympa>
922
926
and the new form of command line arguments was introduced.
923
927
928
+ The C<--noout > option was introduced on Sympa 6.2.71b.
929
+
924
930
=cut
You can’t perform that action at this time.
0 commit comments