diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2004-07-05 09:22:41 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2004-07-05 09:22:41 +0000 |
commit | d04e4cd61a32488b4789ef9cf55ffdc5c29852fd (patch) | |
tree | 6116ca3c11273bce738d3056a5fe87a0785e5412 /usr.sbin | |
parent | 6bac4966489dce45d8c2ea0c30f0504c71b1140c (diff) |
less esoteric error message for missing @name, on a question from
Brad Webb.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackingList.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingList.pm b/usr.sbin/pkg_add/OpenBSD/PackingList.pm index e523a6cc60c..7d87c4111de 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackingList.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackingList.pm @@ -1,4 +1,4 @@ -# $OpenBSD: PackingList.pm,v 1.8 2004/05/19 13:05:16 espie Exp $ +# $OpenBSD: PackingList.pm,v 1.9 2004/07/05 09:22:40 espie Exp $ # # Copyright (c) 2003 Marc Espie. # @@ -120,6 +120,10 @@ MAINLOOP: sub write { my ($self, $fh) = @_; + if (!defined $self->{name}) { + print STDERR "Can't write unnamed packing list\n"; + exit 1; + } $self->{name}->write($fh); if (defined $self->{'no-default-conflict'}) { $self->{'no-default-conflict'}->write($fh); |