Skip to content

Commit 3dbd9f7

Browse files
committed
Fix path lookup using normalized package version
The restored path will normalize away leading zeroes
1 parent cf88d8c commit 3dbd9f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/dotnet-chromium/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
3535
".nuget", "packages",
3636
$"chromium.{runtime}",
37-
ThisAssembly.Project.NativeVersion,
37+
NuGetVersion.Parse(ThisAssembly.Project.NativeVersion).ToNormalizedString(),
3838
"runtimes",
3939
runtime,
4040
"native",
@@ -62,7 +62,7 @@ await AnsiConsole.Status().StartAsync($"Restoring chromium.{runtime} v{ThisAssem
6262
// If it still doesn't exist after an attempted restore, then we can't continue.
6363
if (!File.Exists(chromium))
6464
{
65-
AnsiConsole.MarkupLine($"[red]Current runtime {RuntimeInformation.RuntimeIdentifier} is not supported for v{ThisAssembly.Project.NativeVersion}.[/]");
65+
AnsiConsole.MarkupLine($"[red]Current runtime {RuntimeInformation.RuntimeIdentifier} is not supported for v{NuGetVersion.Parse(ThisAssembly.Project.NativeVersion).ToNormalizedString()}.[/]");
6666
if (DependencyContext.Default != null && args.Any(x => x == "--debug"))
6767
{
6868
AnsiConsole.MarkupLine($"[yellow]Compatible runtimes:[/]");

0 commit comments

Comments
 (0)