Allow Wails3 Doctor recognize globally installed apt packages (#2972)

* Fixes doctor bug for apt package manager

* Actually fix it

* Pad the text " all" 

Adding a space to ensure checking against "all" doesn't always catch "install" or "not-installed" etc

* Update changelog.md

Doctor Apt Verify

---------

Co-authored-by: atterpac <michael@atterpac.dev>
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
This commit is contained in:
Atterpac 2023-10-21 01:32:50 -04:00 committed by GitHub
commit fb17ec8064
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -23,10 +23,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- [darwin] Fixed application frozen when quit by @5aaee9 in [#2982](https://github.com/wailsapp/wails/pull/2982)
- Fixed Doctor apt package verify by [Atterpac](https://github.com/Atterpac) in [#2972](https://github.com/wailsapp/wails/pull/2972).
- Fixed application frozen when quit (Darwin) by @5aaee9 in [#2982](https://github.com/wailsapp/wails/pull/2982)
- Fixed background colours of examples on Windows by [mmgvh](https://github.com/mmghv) in [#2750](https://github.com/wailsapp/wails/pull/2750).
- Fixed default context menus by [mmgvh](https://github.com/mmghv) in [#2753](https://github.com/wailsapp/wails/pull/2753).
### Changed
### Removed

View file

@ -58,7 +58,8 @@ func (a *Apt) PackageInstalled(pkg *Package) (bool, error) {
return false, nil
}
output, err := a.listPackage(pkg.Name)
return strings.Contains(output, "[installed]"), err
// apt list -qq returns "all" if you have packages installed globally and locally
return strings.Contains(output, "installed") || strings.Contains(output, " all"), err
}
// PackageAvailable tests if the given package is available for installation