diff --git a/internal/flypg/state/store.go b/internal/flypg/state/store.go index 8a368f89..77759d6a 100644 --- a/internal/flypg/state/store.go +++ b/internal/flypg/state/store.go @@ -85,7 +85,7 @@ func clientConfig() (*api.Config, error) { token, set := u.User.Password() if !set { - return nil, fmt.Errorf("token not set") + return nil, fmt.Errorf("consul token not set") } u.User = nil diff --git a/internal/utils/shell.go b/internal/utils/shell.go index 139c05a5..ca79c1e9 100644 --- a/internal/utils/shell.go +++ b/internal/utils/shell.go @@ -4,6 +4,7 @@ import ( "bytes" "fmt" "io" + "log" "os" "os/exec" "os/user" @@ -17,6 +18,8 @@ func RunCommand(cmdStr, usr string) ([]byte, error) { return nil, err } + log.Printf("> Running command as %s: %s\n", usr, cmdStr) + cmd := exec.Command("sh", "-c", cmdStr) cmd.SysProcAttr = &syscall.SysProcAttr{} cmd.SysProcAttr.Credential = &syscall.Credential{Uid: uint32(uid), Gid: uint32(gid)}