diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2014-07-08 16:52:48 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2014-07-08 16:52:48 +0000 |
commit | f28809a189dd76310882ba855a6e5e7246a6187f (patch) | |
tree | 60488d3b8e3a18a4a0bfb451421d45eb6da97b97 /usr.sbin | |
parent | cbd4f98f36e9509dbe78274e617a66eb95722a65 (diff) |
in case we say("Some parameter #1 blabla there") but we
forget the parameter, display a decent error message instead
of the usual warning...
Diffstat (limited to 'usr.sbin')
-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; } |