Skip to content

Commit

Permalink
fix: show error when running chown command
Browse files Browse the repository at this point in the history
  • Loading branch information
femnad committed Feb 4, 2024
1 parent 834d978 commit 5c203b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions internal/filecontent.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,7 @@ func chown(file, user, group string) error {
}
chownCmd += " " + file

isRoot, err := IsUserRoot()
if err != nil {
return err
}

return marecmd.RunNoOutput(marecmd.Input{Command: chownCmd, Sudo: !isRoot})
return MaybeRunWithSudo(chownCmd)
}

func ensureDir(dir string) error {
Expand Down
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.31.6"
version = "0.31.7"
)

type args struct {
Expand Down

0 comments on commit 5c203b6

Please sign in to comment.