Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/IPC/Run.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1161,6 +1161,9 @@ my %cmd_cache;

sub _search_path {
my ($cmd_name) = @_;

croak "can't find empty command" unless length $cmd_name;

if ( File::Spec->file_name_is_absolute($cmd_name) && -x $cmd_name ) {
_debug "'", $cmd_name, "' is absolute"
if _debugging_details;
Expand Down Expand Up @@ -1803,6 +1806,8 @@ sub harness {
croak "Process control symbol ('|', '&') missing" if $cur_kid;
croak "Can't spawn a subroutine on Win32"
if Win32_MODE && ref eq "CODE";
croak "Can't run undefined command. Did you pass a reference to an undefined array?"
if !defined($_->[0]) && ref eq 'ARRAY';
$cur_kid = {
TYPE => 'cmd',
VAL => $_,
Expand Down