Skip to content

Commit

Permalink
feat: support cosmovisor as binary (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
troykessler authored Dec 28, 2023
1 parent 181fff5 commit fe1fec2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion utils/binaries.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@ func GetHomePathFromBinary(binaryPath string) string {
os.Exit(1)
}

out, err := exec.Command(cmdPath).Output()
startArgs := make([]string, 0)

// if we run with cosmovisor we start with the cosmovisor run command
if strings.HasSuffix(binaryPath, "cosmovisor") {
startArgs = append(startArgs, "run")
}

out, err := exec.Command(cmdPath, startArgs...).Output()
if err != nil {
logger.Error().Msg("failed to get output of binary")
os.Exit(1)
Expand Down

0 comments on commit fe1fec2

Please sign in to comment.