Skip to content

[Windows] Specify full path to pl2bat.bat #459

Open
@shawnlaffan

Description

@shawnlaffan

See StrawberryPerl/Perl-Dist-Strawberry#174 for further discussion (mainly StrawberryPerl/Perl-Dist-Strawberry#174 (comment) and StrawberryPerl/Perl-Dist-Strawberry#174 (comment)).

The fixin code in ExtUtils::MM_Win32 does not specify the full path to the file. This generally works but things can be tripped up when running with nested MSYS2 and Windows shells, where MSYS2 style paths do not work when passed to Windows shells (e.g. /c/somepath/bin/pl2bat.bat is treated as C:\c\somepath\bin\pl2bat.bat). In such cases the make utility throws an error and the build stops.

One way to avoid this is to specify the full path to pl2bat in ExtUtils::MM_Win32 when creating the Makefile.

$self->{FIXIN} ||= $self->{PERL_CORE} ?
"\$(PERLRUN) -I$self->{PERL_SRC}\\cpan\\ExtUtils-PL2Bat\\lib $self->{PERL_SRC}\\win32\\bin\\pl2bat.pl" :
'pl2bat.bat';

This would then match all the other utilities which are specified using their full paths.

If this is deemed useful then I can prep a PR.

CC @mohawk2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions