-
Notifications
You must be signed in to change notification settings - Fork 384
Fix handler when install script makes an incomplete install #2106
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
281c44d to
f320a62
Compare
nagilson
commented
Feb 13, 2025
|
|
||
|
|
||
| // The install script can leave behind a directory in an invalid install state. Make sure the executable is present at the very least. | ||
| if (this.fileUtilities.existsSync(installContext.installDir) && !this.fileUtilities.existsSync(path.join(installContext.installDir, getDotnetExecutable()))) |
Member
Author
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.
What if it failed to write all of the binary? might wanna check that executing this also gives a 0 status code like dotnet --info or smth if it does exist.
nagilson
added a commit
to nagilson/vscode-dotnet-runtime
that referenced
this pull request
Apr 11, 2025
The dotnet install script has a bug where it wont do the install if the folder is not empty. Sometimes it will leave a partially done install, like if killed, in which case we get to a bad state. This fixes that by cleaning up the directory, and or checking if dotnet.exe exists, whether it works. dotnet --list-runtimes is a fast way to do this since it should only invoke the host and not need to invoke the SDK. doing just 'dotnet' will not work as that does not return 0. Also, gets rid of the 'lock' exception since thats from the proper-lockfile lib which we don't use anymore. Resolves: dotnet#2059 First scrapped attempt: dotnet#2106
Member
Author
|
closing in favor of the new issue |
nagilson
added a commit
that referenced
this pull request
Apr 15, 2025
* Check if the dotnet install is valid The dotnet install script has a bug where it wont do the install if the folder is not empty. Sometimes it will leave a partially done install, like if killed, in which case we get to a bad state. This fixes that by cleaning up the directory, and or checking if dotnet.exe exists, whether it works. dotnet --list-runtimes is a fast way to do this since it should only invoke the host and not need to invoke the SDK. doing just 'dotnet' will not work as that does not return 0. Also, gets rid of the 'lock' exception since thats from the proper-lockfile lib which we don't use anymore. Resolves: #2059 First scrapped attempt: #2106 * Add missing await * Recursively delete the stuff wipe dir only wipes the files, and the script looks at the folders * Remove tests for deprecated code The Install Multiple versions tests fails bc the deprecated sdk code installs everything into the same folder, so this new cleanup logic will wipe the older folder. The uninstall logic fails because the original sdk code does not work with respect to finding a local sdk when a global sdk is on the machine (it finds a 7.0.4xx sdk), this code is not used by anything anymore so it is likely not worth investigating. * Update changelog * Changelog should mention min vscode version * Check if dotnet meets the requirement of the install
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For #2059