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

Prefer tools with platform affinity #3067

Merged
merged 1 commit into from
Feb 28, 2021

Conversation

gitfool
Copy link
Contributor

@gitfool gitfool commented Feb 1, 2021

Initial idea to fix #3066 - sort tool exe names by "platform affinity"; using executable extension to identify Windows specific tools.

Specifically, tool exe names ending with bat, cmd or exe extensions are assumed to be Windows tools. If the detected runtime platform is also Windows then such tools will be prioritized, otherwise they will be deprioritized. In both cases their relative order will be preserved.

With this fix, tool authors won't have to deal with environmental specific hacks like MihaMarkic/Cake.Docker#84.

@gitfool gitfool changed the title WIP: Prefer tools with platform affinity Prefer tools with platform affinity Feb 21, 2021
@gitfool gitfool force-pushed the gh3066 branch 2 times, most recently from 7a8c140 to 2001abe Compare February 21, 2021 21:34
@gitfool
Copy link
Contributor Author

gitfool commented Feb 21, 2021

Ready for review.

Copy link
Member

@augustoproiete augustoproiete left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Tested locally on Windows and on OSX, and tool resolution correctly sort tools giving preference to the tool most compatible with the platform where the Cake script is running.

@augustoproiete augustoproiete merged commit b40794f into cake-build:develop Feb 28, 2021
@augustoproiete
Copy link
Member

@gitfool your changes have been merged, thanks for your contribution 👍

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.

Prefer tools with platform affinity
2 participants