Skip to content

Commit d4531a8

Browse files
GabrielDufclaude
andcommitted
Check the exact installed package name in the AUR end-to-end test
pacman -Q also answers for a package that only provides the name, which let yay's pfetch-rs substitution pass the install check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 095daea commit d4531a8

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎src/UniGetUI.PackageEngine.Tests/AurEndToEndTests.cs‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,11 @@ private static async Task Completes(AbstractOperation operation)
6666

6767
private static bool PacmanHas(string package)
6868
{
69-
using var p = Process.Start(new ProcessStartInfo("pacman", ["-Q", package]) { RedirectStandardOutput = true, RedirectStandardError = true })!;
69+
using var p = Process.Start(new ProcessStartInfo("pacman", ["-Qq", package]) { RedirectStandardOutput = true, RedirectStandardError = true })!;
70+
string installedName = p.StandardOutput.ReadToEnd().Trim();
71+
p.StandardError.ReadToEnd();
7072
p.WaitForExit();
71-
return p.ExitCode == 0;
73+
return p.ExitCode == 0 && installedName == package;
7274
}
7375

7476
[AurEndToEndFact]

0 commit comments

Comments
 (0)