summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2014-07-08 16:52:47 +0000
committerespie <espie@openbsd.org>2014-07-08 16:52:47 +0000
commit0182b1cd9002bb393ee193e7c5d631c83b4d268d (patch)
tree522d60abefb7001ec42defb4811c6d47a6b11e5e
parentPrettify the list of "required by" package names by sorting it. (diff)
downloadwireguard-openbsd-0182b1cd9002bb393ee193e7c5d631c83b4d268d.tar.xz
wireguard-openbsd-0182b1cd9002bb393ee193e7c5d631c83b4d268d.zip
in case we say("Some parameter #1 blabla there") but we
forget the parameter, display a decent error message instead of the usual warning...
-rw-r--r--usr.sbin/pkg_add/OpenBSD/State.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/State.pm b/usr.sbin/pkg_add/OpenBSD/State.pm
index 12ea7cb4d72..89270c1a6da 100644
--- a/usr.sbin/pkg_add/OpenBSD/State.pm
+++ b/usr.sbin/pkg_add/OpenBSD/State.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: State.pm,v 1.30 2014/06/10 15:50:01 espie Exp $
+# $OpenBSD: State.pm,v 1.31 2014/07/08 16:52:47 espie Exp $
#
# Copyright (c) 2007-2014 Marc Espie <espie@openbsd.org>
#
@@ -233,7 +233,7 @@ sub f
my ($fmt, @l) = @_;
# make it so that #0 is #
unshift(@l, '#');
- $fmt =~ s/\#(\d+)/$l[$1]/ge;
+ $fmt =~ s,\#(\d+),($l[$1] // "<Undefined #$1>"),ge;
return $fmt;
}