-
Notifications
You must be signed in to change notification settings - Fork 588
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
DotNet SDK Default Paths #1963
DotNet SDK Default Paths #1963
Conversation
This failed during the packaging steps for the exact reasons mentioned in the attached discussion: The packaging was done with the |
Actually the problem is just that we assumed that we install into the default directory here: I guess this needs to be changed now as the assumption is no longer true |
Ah I see, the install needs to pass that install dir arg, yeah |
No actually I think the installer should install in users directory as otherwise this only leads to permission problems. So we basically have two "defaults", one where we look for the global installation and one where we look for user-local installations. |
If we do that then we have to then do additional probing across the two locations to check which one (or both?) has the intended version. Which again, is hard to reconcile with PATH. Are we sure that permissions will be a big deal? |
Maybe there is another bug as it seems to ignore the install parameter at the moment |
Yes there will be people on corporate environments who will thank you |
ping :) |
703201c
to
2550287
Compare
…ctories, per the documentation at https://docs.microsoft.com/en-us/dotnet/core/tools/global-json
@@ -37,7 +37,10 @@ public class when_discovering_the_lastest_FAKE_package | |||
() => _package.Published.Year.ShouldBeGreaterThanOrEqualTo(2012); | |||
|
|||
It should_contain_the_license_url = | |||
() => _package.LicenseUrl.ShouldStartWith("https://github.com/fsharp/Fake/blob/master/License.txt") && _package.LicenseUrl.ShouldEndWith("License.txt"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, please just merge release/next I already fixed that (and actually made the same mistake :D )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hahaha we would make the worst C# devs 😄
Also consider all paths when searching for a matching sdk version. Forward information from install to exec via a new "Version" flag this flag is used to indicate whether FAKE should write a global.json file.
@baronfel @TheAngryByrd @kblohm What do you think about 30bf7e8 ? The basic idea is that the "global.json" topic is orthogonal to installing the SDK with FAKE. This commit
|
That does probably solve a lot of the versioning problems 👍
|
I'm not sure you want to use the
We don't replace an existing file so we either exit with an error or run with the wrong version ... Good catch
For now it's easier to let users create it, because for this we would need a way to figure out if we wrote the file (such that we can overwrite it later if needed). But yeah makes sense. |
First pass at unifying the default paths to the system-wide install locations.
Outstanding questions:
Related to #1961