Skip to content

Commit

Permalink
Fix apt command syntax (wailsapp#1458)
Browse files Browse the repository at this point in the history
  • Loading branch information
abtin committed Jun 17, 2022
1 parent 884773a commit 004f316
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions v2/internal/system/packagemanager/apt.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 004f316

Please sign in to comment.