Closed eashi closed 1 year ago
Thanks for accepting the PR. I haven't came across any other issues, but will keep you posted. Cheers.
Hi @eashi , I have uploaded version 1.6.0 of LogicAppUnit to Nuget. This includes your changes in PR #14 and also PR #15 for support for the MacOS platform. Thank you for your contribution.
This is great news, thanks Mark for the great project and active maintenance.
This PR changes the code that checks for the
func
command in PATH so that it works on both Windows and MacOS.The current code only works on Windows:
Path.PathSeparator
rather than hard-coding a semicolon or a colon. For more information check: https://learn.microsoft.com/en-us/dotnet/api/system.io.path.pathseparator?view=net-7.0func
has the extension suffix.exe
. This is true on Windows, but not on MacOS. This PR searches for both cases to support both Windows and MacOS.Environment.GetEnvironmentVariable("PATH", EnvironmentVariableTarget.Machine)
returns null because the option passedEnvironmentVariableTarget.Machine
fails on MacOS. Removing the option fixes it and shouldn't cause any unexpected behaviours. For more infomration check https://learn.microsoft.com/en-us/dotnet/api/system.environment.getenvironmentvariable?view=net-7.0