5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 21:10:54 +08:00

Fix apt command syntax (#1458) (#1461)

This commit is contained in:
Abtin 2022-06-17 19:26:22 -04:00 committed by GitHub
parent 41051e8848
commit 9a01c757bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,7 +65,7 @@ func (a *Apt) PackageInstalled(pkg *Package) (bool, error) {
if pkg.SystemPackage == false {
return false, nil
}
cmd := exec.Command("apt", "-qq", "list", pkg.Name)
cmd := exec.Command("apt", "list", "-qq", pkg.Name)
var stdo, stde bytes.Buffer
cmd.Stdout = &stdo
cmd.Stderr = &stde
@ -79,7 +79,7 @@ func (a *Apt) PackageAvailable(pkg *Package) (bool, error) {
if pkg.SystemPackage == false {
return false, nil
}
stdout, _, err := shell.RunCommand(".", "apt", "-qq", "list", pkg.Name)
stdout, _, err := shell.RunCommand(".", "apt", "list", "-qq", pkg.Name)
// We add a space to ensure we get a full match, not partial match
output := a.removeEscapeSequences(stdout)
installed := strings.HasPrefix(output, pkg.Name)