Skip to content

Commit

Permalink
Fix pipeline again (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
Smaug123 authored Jun 17, 2024
1 parent 73d818b commit 890124d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
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

0 comments on commit 890124d

Please sign in to comment.