Atomic install tool (#8518)

* Make dotnet install tool atomic

Apply TransactionScope to tool install. It can handle the correct timing
of roll back and commit.

Convert existing ToolPackageObtainer and ShellShimMaker by passing logic
via lambda to an object that has IEnlistmentNotification interface. It
turns out the very clean.

Use .stage as staging place to verify of package content, and shim. It
should roll back when something is wrong. When there is ctrl-c, there
will be garbage in .stage folder but not the root of the package folder.
This commit is contained in:
William Lee 2018-02-06 13:38:06 -08:00 committed by GitHub
parent 38e452204c
commit 5fa558a2ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
33 changed files with 995 additions and 207 deletions

View file

@ -793,6 +793,11 @@ setx PATH "%PATH%;{1}"</target>
<target state="new">Command '{0}' uses unsupported runner '{1}'."</target>
<note />
</trans-unit>
<trans-unit id="ToolPackageConflictPackageId">
<source>Tool '{0}' is already installed.</source>
<target state="new">Tool '{0}' is already installed.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>