5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-20 19:09:29 +08:00

Fix package detection for solus

This commit is contained in:
Lea Anthony 2020-05-27 10:33:00 +10:00
parent 81777f29d8
commit 949bc40317

View File

@ -210,8 +210,8 @@ func EOpkgInstalled(packageName string) (bool, error) {
if eopkg == nil {
return false, fmt.Errorf("cannot check dependencies: eopkg not found")
}
_, _, exitCode, _ := eopkg.Run("li", "|", "grep", "-w", packageName)
return exitCode == 0, nil
stdout, _, _, _ := eopkg.Run("info", packageName)
return strings.HasPrefix(stdout, "Installed"), nil
}
// PacmanInstalled uses pacman to see if a package is installed.