Change default executable name when on windows#20
Conversation
|
Not sure that we need to optimise to this level but this might be a more "performant" version of the function public static string DefaultPklExecutableName
#if TARGET_WINDOWS
=> "pkl.exe";
#else
=> "pkl";
#endifI'm guessing this PR was triggered by the failing github actions builds. This is due to an issue with the setup pkl build step and not because of the |
jeremyvaartjes
left a comment
There was a problem hiding this comment.
Happy with this code either way. Feel free to use my comment above or ignore it, I don't think it makes much difference tbh.
That is correct.
I did notice that, but I also assumed that fixing the issue would require both updating pkl-setup and making this change in the way we call pkl in our code. That assumption was incorrect, though: apparently Windows allows omitting the file extension when running programs. |

This changes the default behavior of
EvaluatorManagerwhen no pkl executable path is provided.We used to default to the executable name
pkl, which was our best guess of the name of pkl's executable in the user's PATH.When on Windows, I think it would make more sense to add the
.exefile extension to the file name:pkl.exe. Although we can't be sure that the user's PATH will contain an executable named exactly that way, it's serves as a much better guess for the platform.