mirror of
https://github.com/awalsh128/cache-apt-pkgs-action.git
synced 2026-04-27 21:53:17 +00:00
Fix duplicate error message bug by removing redundant append
Co-authored-by: awalsh128 <2087466+awalsh128@users.noreply.github.com>
This commit is contained in:
parent
49b60534c1
commit
5001e82551
BIN
apt_query-arm64
BIN
apt_query-arm64
Binary file not shown.
BIN
apt_query-x86
BIN
apt_query-x86
Binary file not shown.
|
|
@ -72,6 +72,5 @@ func TestNormalizedList_VirtualPackagesExists_StdoutsConcretePackage(t *testing.
|
|||
func TestNormalizedList_VirtualPackageWithNoProviders_StderrsErrorMessage(t *testing.T) {
|
||||
var result = cmdtesting.New(t, createReplayLogs).Run("normalized-list", "python")
|
||||
result.ExpectError(`Encountered error resolving some or all package names, see combined std[out,err] below.
|
||||
virtual package 'python' has no concrete package providers available
|
||||
virtual package 'python' has no concrete package providers available`)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +1,17 @@
|
|||
2025/09/30 07:33:25 Debug log created at /home/runner/work/cache-apt-pkgs-action/cache-apt-pkgs-action/src/cmd/apt_query/apt_query.log
|
||||
2025/09/30 07:33:26 EXECUTION-OBJ-START
|
||||
2025/10/04 06:59:56 Debug log created at /home/runner/work/cache-apt-pkgs-action/cache-apt-pkgs-action/src/cmd/apt_query/apt_query.log
|
||||
2025/10/04 07:00:00 EXECUTION-OBJ-START
|
||||
{
|
||||
"Cmd": "apt-cache --quiet=0 --no-all-versions show python",
|
||||
"CombinedOut": "N: Can't select candidate version from package python as it has no candidate\nN: Can't select versions from package 'python' as it is purely virtual\nN: No packages found\n",
|
||||
"ExitCode": 0
|
||||
}
|
||||
EXECUTION-OBJ-END
|
||||
2025/09/30 07:33:27 EXECUTION-OBJ-START
|
||||
2025/10/04 07:00:00 EXECUTION-OBJ-START
|
||||
{
|
||||
"Cmd": "bash -c apt-cache showpkg python | grep -A 1 \"Reverse Provides\" | tail -1",
|
||||
"CombinedOut": "Reverse Provides: \n",
|
||||
"ExitCode": 0
|
||||
}
|
||||
EXECUTION-OBJ-END
|
||||
2025/09/30 07:33:27 Encountered error resolving some or all package names, see combined std[out,err] below.
|
||||
virtual package 'python' has no concrete package providers
|
||||
virtual package 'python' has no concrete package providers
|
||||
2025/10/04 07:00:00 Encountered error resolving some or all package names, see combined std[out,err] below.
|
||||
virtual package 'python' has no concrete package providers available
|
||||
|
|
|
|||
|
|
@ -127,10 +127,6 @@ func GetAptPackages(executor exec.Executor, names []string) (AptPackages, error)
|
|||
}
|
||||
}
|
||||
|
||||
if len(errMsgs) > 0 {
|
||||
errMsgs = append(errMsgs, strings.Join(errMsgs, "\n"))
|
||||
}
|
||||
|
||||
sort.Slice(pkgs, func(i, j int) bool {
|
||||
return pkgs[i].Name < pkgs[j].Name
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue