dotnet-sdk-helpers icon indicating copy to clipboard operation
dotnet-sdk-helpers copied to clipboard

Issue with "dotnet sdk releases" (cmd version)

Open ArturKarbone opened this issue 7 years ago • 1 comments

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

ArturKarbone avatar Aug 01 '17 12:08 ArturKarbone

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

shanselman avatar Aug 03 '17 19:08 shanselman