Repository navigation
3671: Create a "SetPaketCommand" target to be able to try Exec the local cli tool - #3672
Merged
Merged
Conversation
able to try Exec local cli tool suggested by @NatElkins.
atlemann
commented
Sep 28, 2019
| <PropertyGroup> | ||
| <_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)"))</_PaketExeExtension> | ||
| <InternalPaketCommand Condition=" '$(InternalPaketCommand)' == '' AND '$(_PaketExeExtension)' == '.dll' ">dotnet "$(PaketExePath)"</InternalPaketCommand> | ||
| <InternalPaketCommand Condition=" '$(InternalPaketCommand)' == '' AND '$(_PaketExeExtension)' == '' AND $(LocalPaketToolExitCode) == 0">dotnet "$(PaketExePath)"</InternalPaketCommand> |
Contributor
Author
There was a problem hiding this comment.
I guess we could start with checking if LocalPaketToolExitCode == 0 and if it is, just set InternalPaketCommand to dotnet paket? @NatElkins
Contributor
There was a problem hiding this comment.
Sure whatever you think is clearest to someone coming back a year from now to try and decipher this.
command into 'SetPaketCommand' target. - If exitcode = 0 then set local tool, if not search as before.
Contributor
Author
|
We could consider this way instead as mentioned in the issue: <PropertyGroup>
<DotnetToolsJson>($([System.IO.File]::ReadAllText("$(PaketRootPath)/.config/dotnet-tools.json")))</DotnetToolsJson>
<ContainsPaket>$(DotnetToolsJson.Contains('"paket"'))</ContainsPaket>
</PropertyGroup> |
Member
|
Oh CI is red? |
Contributor
Author
|
Yes, couldn't see why. |
Member
|
Let's rerun this |
Contributor
Author
|
Ok, the first commit passed and I only moved the paketexe search stuff into the target in the second one to avoid doing that work if not used. But maybe I missed a usage somewhere. |
Contributor
Author
|
Passed now |
Member
|
Thanks so much for the help! |
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
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.
Suggested by @NatElkins.
Fixes: #3671