Skip to content

Commit e7c81a3

Browse files
committed
finddisappeared: make error message GNU-like
1 parent e3bea05 commit e7c81a3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

finddisappeared

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,18 @@ EOF
5454
}
5555

5656
sub main {
57+
my $help_ref = "Try '$PROGRAM --help' for more information.";
58+
5759
GetOptions(
5860
"r|root=s" => \my $opt_root,
5961
"v|version" => \my $opt_version,
6062
"h|help" => \my $opt_help,
61-
) or die "Try '$PROGRAM --help' for more information.\n";
63+
) or die "$help_ref\n";
6264

6365
print_version() and exit if $opt_version;
6466
print_help() and exit if $opt_help;
6567

66-
die "$PROGRAM: invalid option @ARGV\n" if @ARGV;
68+
die "$PROGRAM: invalid option @ARGV\n$help_ref\n" if @ARGV;
6769

6870
finddisappeared $opt_root;
6971
}

0 commit comments

Comments
 (0)