Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: using os.Executable instead of hardcoded roller path #171

Merged
merged 1 commit into from
Jul 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions cmd/run/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@ package run

import (
"context"
"os"
"os/exec"
"sync"

"github.com/dymensionxyz/roller/cmd/consts"
da_start "github.com/dymensionxyz/roller/cmd/da-light-client/start"
relayer_start "github.com/dymensionxyz/roller/cmd/relayer/start"
sequnecer_start "github.com/dymensionxyz/roller/cmd/sequencer/start"
"github.com/dymensionxyz/roller/cmd/utils"
"github.com/spf13/cobra"
"os/exec"
"sync"
)

func Cmd() *cobra.Command {
Expand Down Expand Up @@ -50,7 +52,11 @@ func runRelayerWithRestarts(config utils.RollappConfig, serviceConfig utils.Serv
}

func getStartRelayerCmd(config utils.RollappConfig) *exec.Cmd {
return exec.Command(consts.Executables.Roller, "relayer", "start", "--home", config.Home)
ex, err := os.Executable()
if err != nil {
panic(err)
}
return exec.Command(ex, "relayer", "start", "--home", config.Home)
}

func runDaWithRestarts(rollappConfig utils.RollappConfig, serviceConfig utils.ServiceConfig) {
Expand Down