summaryrefslogtreecommitdiff
path: root/scripts/Dpkg
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2015-09-17 18:01:16 +0200
committerGuillem Jover <guillem@debian.org>2016-05-02 03:35:45 +0200
commit5833b05c482cc8346dd6e7c8785e76f85ed52d4d (patch)
treeae5e0ffdfdb43c55933e6d36c2e8f3aec7816879 /scripts/Dpkg
parentd2a1a297eed6a9f90d400c7314ba0d59441e011f (diff)
downloaddpkg-5833b05c482cc8346dd6e7c8785e76f85ed52d4d.tar.gz
scripts: Refactor command printing into new printcmd() function
Diffstat (limited to 'scripts/Dpkg')
-rw-r--r--scripts/Dpkg/ErrorHandling.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/Dpkg/ErrorHandling.pm b/scripts/Dpkg/ErrorHandling.pm
index 7eef167bc..a77fe194b 100644
--- a/scripts/Dpkg/ErrorHandling.pm
+++ b/scripts/Dpkg/ErrorHandling.pm
@@ -28,6 +28,7 @@ our @EXPORT = qw(
error
errormsg
syserr
+ printcmd
subprocerr
usageerr
);
@@ -91,6 +92,13 @@ sub errormsg($;@)
print { *STDERR } report(g_('error'), @_);
}
+sub printcmd
+{
+ my (@cmd) = @_;
+
+ print { *STDERR } " @cmd\n";
+}
+
sub subprocerr(@)
{
my ($p) = (shift);