dotnet-sdk-helpers
dotnet-sdk-helpers copied to clipboard
Issue with "dotnet sdk releases" (cmd version)
When I run dotnet sdk releases from an arbitrary directory I keep getting: The system cannot find the path specified.
I do think that the issue is related to the fact that "tools" folder is being referenced via relative .\tools and the command works fine only when it is called from the root of the scripts.
The solution here would be to take script path into account. Something like this:
SET script_path=%~dp0
SET tools_path=%script_path%tools
...
%tools_path%\curl %dotnet_releases_url% -H "Accept: application/json" -s | %tools_path%\jq "map({date: .date,sdk: .\"version-sdk\"}) | unique_by(.sdk) | .[] | \"\(.date)\t\(.sdk)\" " -r
Will provide a PR shortly
LOL I literally came here to do a PR with %dp0 for this. ;) @faniereynders
This same change that showed up the most recent commit also needs to take into consideration issue #15