Skip to content

Commit

Permalink
Expand tilde for exec commands as well
Browse files Browse the repository at this point in the history
  • Loading branch information
zMoooooritz authored and muesli committed Jun 11, 2021
1 parent 512913b commit 47321bd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions deck.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ func executeDBusMethod(object, path, method, args string) {

// executes a command.
func executeCommand(cmd string) {
exp, err := expandPath("", cmd)
if err == nil {
cmd = exp
}
args := strings.Split(cmd, " ")
c := exec.Command(args[0], args[1:]...) //nolint:gosec
if err := c.Start(); err != nil {
Expand Down

0 comments on commit 47321bd

Please sign in to comment.