consume bring your own shim(byos) (#9018)

If there are shims packaged by convention in nupkg. Shim Repository will simply copy it to the right location.

The query interface ToolPackageInstance will be in charge of finding the shim folder and filter the right RID. Shim Repository will pick the right file after the folder is located since Shim Repository knows the shim name and it also book keep the files at uninstallation.
During development, due to the wrong adapter level. The mock duplicated too much logic. So, I corrected the abstraction level to lower (only create shim). And replaced the existing mock with a much smaller one without any atomic control and file move, copy logic. At the same time. The chmod, which is a IO action, causes problem during tests. So I added adapter layer to it and put it in Util.
This commit is contained in:
William Li 2018-04-10 15:42:50 -07:00 committed by GitHub
parent 98a1ee6a67
commit b0ee5db411
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
47 changed files with 898 additions and 208 deletions

View file

@ -883,6 +883,16 @@ setx PATH "%PATH%;{0}"
<target state="new">Failed to add '{0}' to the PATH environment variable. Please add this directory to your PATH to use tools installed with 'dotnet tool install'.</target>
<note />
</trans-unit>
<trans-unit id="MoreThanOnePackagedShimAvailable">
<source>More than one packaged shim is available: {0}.</source>
<target state="new">More than one packaged shim is available: {0}.</target>
<note />
</trans-unit>
<trans-unit id="FailedToReadNuGetLockFile">
<source>Failed to read NuGet LockFile for tool package '{0}': {1}</source>
<target state="new">Failed to read NuGet LockFile for tool package '{0}': {1}</target>
<note />
</trans-unit>
</body>
</file>
</xliff>