Skip to content
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

C#: Use nuget.exe from the executing machine instead of always downlo… #16498

Merged
merged 1 commit into from
May 21, 2024

Conversation

tamasvajk
Copy link
Contributor

…ading it

@github-actions github-actions bot added the C# label May 15, 2024
@tamasvajk tamasvajk force-pushed the buildless/use-nuget-from-path branch from 6194154 to 7806030 Compare May 15, 2024 14:19
@tamasvajk tamasvajk force-pushed the buildless/use-nuget-from-path branch from 7806030 to a79105e Compare May 16, 2024 21:15
@tamasvajk tamasvajk marked this pull request as ready for review May 17, 2024 06:16
@tamasvajk tamasvajk requested a review from a team as a code owner May 17, 2024 06:16
var exe = "mono";
var args = $"{nugetExe} {command}";
string exe, args;
if (RunWithMono)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can be the case that we're on a linux/mac machine, but we need to run nuget instead of mono nuget.exe. In these cases mono nuget would simply fail.

For example, on my machine:

❯ mono /Library/Frameworks/Mono.framework/Versions/Current/Commands/nuget
Cannot open assembly '/Library/Frameworks/Mono.framework/Versions/Current/Commands/nuget': File does not contain a valid CIL image.

because

❯ cat /Library/Frameworks/Mono.framework/Versions/Current/Commands/nuget
#!/bin/sh
exec /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono $MONO_OPTIONS /Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/nuget/nuget.exe "$@"

Copy link
Contributor

@michaelnebel michaelnebel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - just one question :-)

@tamasvajk tamasvajk merged commit 1a20a62 into github:main May 21, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants