-
Notifications
You must be signed in to change notification settings - Fork 264
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
Consider when the user Cancels the SDK Installer on Mac #1993
Conversation
Consider that to tell if the user wanted to say 'no' or 'yes' to retry, that doesnt indicate whether they meant to do the install or not. We would then need more options to tell if we actually failed or not. I dont want to rely on this and I dont think it is a high enough priority with the complexity required to reroute the code to add a retry button that does a certain retry depending on if someone clicked to cancel the install on mac
@@ -3,6 +3,7 @@ | |||
* The .NET Foundation licenses this file to you under the MIT license. | |||
*--------------------------------------------------------------------------------------------*/ | |||
|
|||
import { IDotnetAcquireContext, IVSCodeExtensionContext } from '..'; |
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.
Is this needed?
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.
This is no longer needed, thank you, I will remove this in a upcoming change
catch(error : any) // fs.readdirsync throws ENOENT so we need to recall the function | ||
{ | ||
this.assertOrThrowError(failOnErr, false, | ||
`${dotnetValidationFailed} The dotnet file dne "${dotnetPath}"`, install, dotnetPath); |
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.
dne?
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.
does not exist
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.
I should be more clear with these messages, good point
Resolves #1572
Background
When installing via Mac, our biggest failure right now is 'Validation of Installation' failed. This is because we use
open
which returns 0 even if someone closes the installer, cancels the installation, or fails the password prompt in the .NET installer, so we assume it has succeeded and then check to make sure .NET was installed and fail because it was notWe could
A - Assume that someone cancelled if the install isnt there and open on the installer returned 0
B - Move to
sudo installer -pkg Path -target LocalSystem
Unfortunately to use installer you need to use sudo first so we need to use this joyous password prompt every single time if we do that:
I consulted our PM to decide how to handle this and he suggested:
I started the implementation of this but it is very ugly and the telemetry logic/counting of where we are in the install gets jank and it would take a lot of effort. In addition, we would want a 'yes' and 'no' button with distinct categories to solve what we are trying to solve -- yes, I want to retry and I had cancelled it; yes, I want to retry because it failed; no with either or the above.
So what I decided to do:
What's in the PR
When the Mac installation for SDKs fails but the installer returned 0, we add a message asking the user if they had cancelled the installation request, and if so and they want the SDK to be installed, to please try again.