- return @_ if $_[0] =~ /^\//;
- return Cwd::abs_path(shift), @_ if -x $_[0];
+ if (@_) {
+ return @_ if $_[0] =~ /^\//;
+ return Cwd::abs_path(shift), @_ if -x $_[0];
+ }
if (open(my $f, '<', "$etc/os-release")) {
local $_ = join '', <$f>;
my ($id) = /^ID="?(.*?)"?\s*$/m;
if (open(my $f, '<', "$etc/os-release")) {
local $_ = join '', <$f>;
my ($id) = /^ID="?(.*?)"?\s*$/m;