-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Support RID-specific .NET Tool packages #48575
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
Changes from all commits
b3e952b
e3bac63
839eae4
54611eb
2b316c3
be491e8
eb7bd6e
0db06fb
8fff9de
2b7d6fc
c658286
2825c91
e54cbc7
654cc87
49c1f3f
96b8f68
f5be4e9
897cd47
9979e7d
76e11ee
ad10115
57f7827
1a3a87e
a98b140
d59f303
ca05289
d36bd6b
3879a60
f8a71f5
e3d0f17
715b05a
c7fe91a
52a876b
a50b825
5efe2e3
e4b0dab
ca4cb72
e07e506
12617cb
557f205
89adcf5
18f16d9
a234b47
9e88dfb
eae9bc4
b2c282e
33e96e1
a5db0b5
910d1f2
4e9346f
c1bf6cc
a09bc83
f7103e6
f258f1e
39a3a7e
4a47a53
dc47b23
c3d9c7e
0801775
b738962
6f320fd
bcb9710
b052a4c
2845c9b
efdf6cc
e2792ab
573c959
111cee6
ff5e754
4d0242f
e375276
ee217d0
95ed8fc
9aa2a74
5914521
6c6bf33
e296230
acd52ee
846fa13
78a0509
b6b1c58
b76fd91
efcdd4a
fac0117
922242b
ce1bba1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,11 +66,17 @@ public IToolPackage Install(FilePath manifestFile, PackageId packageId) | |
|
||
try | ||
{ | ||
// NOTE: The manifest file may or may not be under a .config folder. If it is, we will use | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: Are these comments split up due to the line length linter limit? It would be easier to read if it was a sentence per line. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I usually manually word wrap my comments at roughly the line length of the surrounding code. |
||
// that directory as the root config directory. This should be OK, as usually there won't be | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: Extra space in the comment There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you mean after the period? I often put two spaces after the end of a sentence as that's what I learned when I was learning to type (on a mechanical typewriter!). |
||
// a NuGet.config in the .config folder, and if there is it's better to use it than to go one | ||
// more level up and miss the root repo folder if the manifest file is not under a .config folder. | ||
var rootConfigDirectory = manifestFile.GetDirectoryPath(); | ||
|
||
IToolPackage toolDownloadedPackage = _toolPackageDownloader.InstallPackage( | ||
new PackageLocation( | ||
nugetConfig: configFile, | ||
additionalFeeds: _sources, | ||
rootConfigDirectory: manifestFile.GetDirectoryPath().GetParentPath()), | ||
rootConfigDirectory: rootConfigDirectory), | ||
packageId, | ||
verbosity: _verbosity, | ||
versionRange, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,16 +70,12 @@ public override int Execute() | |
|
||
try | ||
{ | ||
using (var scope = new TransactionScope( | ||
TransactionScopeOption.Required, | ||
TimeSpan.Zero)) | ||
TransactionalAction.Run(() => | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like this new TransactionalAction refactor! Thank you! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, we were already using TransactionalAction in other places, this makes it more consistent and easier to find all the places that participate in the transaction. |
||
{ | ||
shellShimRepository.RemoveShim(package.Command.Name); | ||
shellShimRepository.RemoveShim(package.Command); | ||
|
||
toolPackageUninstaller.Uninstall(package.PackageDirectory); | ||
|
||
scope.Complete(); | ||
} | ||
}); | ||
|
||
_reporter.WriteLine( | ||
string.Format( | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Thank you for this comment, it was helpful 👍