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

Fix pipeline again #14

Merged
merged 2 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dotnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ jobs:
if: steps.publish-success.outputs.result == 'published'
env:
PACKAGE_VERSION: ${{ steps.publish-success.outputs.version }}
run: 'echo "$PACKAGE_VERSION" && while ! curl --fail -o from-nuget.nupkg "https://www.nuget.org/api/v2/package/WoofWare.DotnetRuntimeLocator/$PACKAGE_VERSION" ; do sleep 10; done'
run: 'echo "$PACKAGE_VERSION" && while ! curl -L --fail -o from-nuget.nupkg "https://www.nuget.org/api/v2/package/WoofWare.DotnetRuntimeLocator/$PACKAGE_VERSION" ; do sleep 10; done'
# Astonishingly, NuGet.org considers it to be "more secure" to tamper with my package after upload (https://devblogs.microsoft.com/nuget/introducing-repository-signatures/).
# So we have to *re-attest* it after it's uploaded. Mind-blowing.
- name: Assert package contents
Expand Down
11 changes: 4 additions & 7 deletions WoofWare.DotnetRuntimeLocator/DotnetEnvironmentInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,11 @@ public record DotnetEnvironmentInfo(
var parent3 = parent2.Parent ??
throw new Exception("Unable to locate the host/fxr directory in the .NET runtime");
var fxrDir = new DirectoryInfo(Path.Combine(parent3.FullName, "host", "fxr"));
// Until net6, libhostfxr did not contain the entrypoint we use, and I can't be bothered to reimplement
// it on those runtimes. I'm just going to assume you have no runtimes earlier than 3 installed.
Func<DirectoryInfo, bool> isAcceptableName =
di =>
{
// Until net6, libhostfxr did not contain the entrypoint we use, and I can't be bothered to reimplement
// it on those runtimes. I'm just going to assume you have no runtimes earlier than 3 installed.
return !di.Name.StartsWith("3.", StringComparison.Ordinal) &&
!di.Name.StartsWith("5.", StringComparison.Ordinal);
};
di => !di.Name.StartsWith("3.", StringComparison.Ordinal) &&
!di.Name.StartsWith("5.", StringComparison.Ordinal);
return fxrDir.EnumerateDirectories().First(isAcceptableName).EnumerateFiles("*hostfxr*").First();
});

Expand Down