diff options
author | 2014-07-08 16:52:47 +0000 | |
---|---|---|
committer | 2014-07-08 16:52:47 +0000 | |
commit | 0182b1cd9002bb393ee193e7c5d631c83b4d268d (patch) | |
tree | 522d60abefb7001ec42defb4811c6d47a6b11e5e | |
parent | Prettify the list of "required by" package names by sorting it. (diff) | |
download | wireguard-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.pm | 4 |
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; } |