Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix windows path incompatibility #58

Merged
merged 1 commit into from
Feb 10, 2024

Conversation

jsun-splunk
Copy link
Contributor

When using rules_perl with nmake on windows, the exported path to PERL has / instead of \. This causes nmake targets to break.

For example when nmake need to execute a target that needs to run:

C:\users\jsun\_bazel_jsun\2pzzqzw2\execroot\splcore\external/perl_windows_x86_64/perl/bin/perl.exe util/mkdir-p.pl

It returns the error

'C:\users\jsun\_bazel_jsun\2pzzqzw2\execroot\splcore\external' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'C:\users\jsun\_bazel_jsun\2pzzqzw2\execroot\splcore\external' : return code '0x1'
Stop.

This PR fixes this by checking for the appropriate windows platform constraint and replacing the path separator as needed. The method is documented here

@jsun-splunk
Copy link
Contributor Author

@skeletonkey are you ok to give this a review?

@skeletonkey skeletonkey merged commit acc3744 into bazel-contrib:main Feb 10, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants