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

Fake.Dotnet.Cli.DotNetInstallerOptions Default branch #1739

Closed
auxym opened this issue Nov 26, 2017 · 5 comments
Closed

Fake.Dotnet.Cli.DotNetInstallerOptions Default branch #1739

auxym opened this issue Nov 26, 2017 · 5 comments

Comments

@auxym
Copy link

auxym commented Nov 26, 2017

Description

Hello, I would like to suggest that the default branch to download the installer be updated. I'm not submitting a PR because I don't think it's worth it for a one-string-fix, but see here

I'd suggest either master or, if we fear that the script might be unstable (which I doubt), then maybe release/2.0.0?

Repro steps

The old script from the currentdefault 1.0.0 branch was giving me all sorts of weird powershell errors when I was trying to specify the Current or 2.0 channel. For example, try this:

Target.Create "InstallDotNetCLI" (fun _ ->
    DotnetCliInstall (fun opts ->
        {opts with 
            Channel = Some "2.0"
            }
        )
)

Expected behavior

Error free install of dotnet 2.0 using default options :)

Actual behavior

Various errors from the old ps1 script, for example:

Failed to download https://dotnetcli.blob.core.windows.net/dotnet/Sdk/current/latest.version. StatusCode: 404, ReasonPhrase: 'The specifblob does not exist.', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:

dotnet_install.ps1 : Cannot convert argument "bytes", with value:"9e724ed14e4213b7300af702c16244a242acc56b

Known workarounds

Manually specifying the installer options:

Target.Create "InstallDotNetCLI" (fun _ ->
    DotnetCliInstall (fun opts ->
        {opts with 
            Channel = Some "2.0"
            InstallerOptions = (fun opts -> {opts with Branch="master"})
            }
        )
)

Related information

  • Win10
  • Fake 5.0.0 beta 10 from Nuget
  • .NET 4.6.2
@matthid
Copy link
Member

matthid commented Dec 15, 2017

I'm not submitting a PR because I don't think it's worth it

It is always worth it :). For example, we can see in the builds that everything is still green and I can simply click merge ;).

Please send a PR. I guess we should change the default branch to rel/2.0.0 now? I also guess that the branch should always matches/works with our suggested default version. Can we add a test for that?

@auxym
Copy link
Author

auxym commented Dec 15, 2017

Noted! I'll look into putting together a PR with a test.

@auxym
Copy link
Author

auxym commented Dec 19, 2017

@matthid BTW, I was also thinking it would be useful to check the user's path for dotnet, additionally to DefaultDotnetCliDir before installing a new copy. Something like try running cmd /c dotnet --version / sh -c dotnet --version and if the returned version satisfies a given constraint, skip the install and use whatever is on the path. What do you think? I could look into a separate PR for this.

@matthid
Copy link
Member

matthid commented Jan 27, 2018

Yes a PR would be nice to discuss the changes. In principle I agree that we can reuse an existing installation if either the installed version matches or the user has not specified a version explicitly in the fake script.

matthid added a commit that referenced this issue Jan 27, 2018
@matthid
Copy link
Member

matthid commented Jan 27, 2018

The issue itself will be fixed with beta012

@matthid matthid closed this as completed Jan 27, 2018
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

No branches or pull requests

2 participants