We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e27836a + 53737f3 commit 7cd51a3Copy full SHA for 7cd51a3
bin/sort
@@ -85,9 +85,15 @@ sub _sort_file {
85
86
# set output and other defaults
87
$opts->{o} = !$opts->{o} ? '' : $opts->{o};
88
- $opts->{'y'} ||= $ENV{MAX_SORT_RECORDS} || 200000; # default max records
89
- $opts->{F} ||= $ENV{MAX_SORT_FILES} || 40; # default max files
90
+ $opts->{'y'} ||= $ENV{'MAX_SORT_RECORDS'} || 200000; # default max records
+ $opts->{'F'} ||= $ENV{'MAX_SORT_FILES'} || 40; # default max files
91
+ if (defined $opts->{'F'}) {
92
+ die "option -F expects a positive number\n" if (int($opts->{'F'}) < 1);
93
+ }
94
+ if (defined $opts->{'y'}) {
95
+ die "option -y expects a positive number\n" if (int($opts->{'y'}) < 1);
96
97
98
# see big ol' mess below
99
_make_sort_sub($opts);
0 commit comments