Skip to content

Commit

Permalink
fix: typo in command name
Browse files Browse the repository at this point in the history
  • Loading branch information
femnad committed Dec 26, 2023
1 parent f27d0ec commit cfaa209
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

const (
version = "0.24.1"
version = "0.24.2"
)

type args struct {
Expand Down
9 changes: 6 additions & 3 deletions packages/apt.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ import (
"github.com/femnad/fup/remote"
)

const pkgScriptsDir = "/var/lib/dpkg/info"
const (
dpkg = "dpkg"
pkgScriptsDir = "/var/lib/dpkg/info"
)

var pkgScripts = []string{"postinst", "preinst"}

Expand Down Expand Up @@ -50,7 +53,7 @@ func (Apt) UpdateCmd() string {
}

func installPkgSkipScripts(pkgName, filename string) error {
err := internal.MaybeRunWithSudo(fmt.Sprintf("dpkg --unpack %s", filename))
err := internal.MaybeRunWithSudo(fmt.Sprintf("%s --unpack %s", dpkg, filename))
if err != nil {
return err
}
Expand All @@ -63,7 +66,7 @@ func installPkgSkipScripts(pkgName, filename string) error {
}
}

return internal.MaybeRunWithSudo(fmt.Sprintf("dkpg --configure %s", pkgName))
return internal.MaybeRunWithSudo(fmt.Sprintf("%s --configure %s", dpkg, pkgName))
}

func (Apt) RemoteInstall(pkgs []entity.RemotePackage) error {
Expand Down

0 comments on commit cfaa209

Please sign in to comment.