Skip to content

Commit

Permalink
Allow Wails3 Doctor recognize globally installed apt packages (#2972)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
Co-authored-by: Lea Anthony <[email protected]>
  • Loading branch information
3 people authored Oct 21, 2023
1 parent 51f5265 commit fb17ec8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion mkdocs-website/docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion v3/internal/doctor/packagemanager/apt.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fb17ec8

Please sign in to comment.