Skip to content

Commit

Permalink
Implemented workaround for initialize phase when a cosmos app takes a…
Browse files Browse the repository at this point in the history
… moniker as an argument
  • Loading branch information
samalba committed Dec 1, 2018
1 parent 544e37d commit b2b6cc8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,17 @@ func initialize(ctx context.Context, p *project.Project) error {

ui.Info("Generating configuration and genesis files")
if err := dockerRun(ctx, p, "init"); err != nil {
return err
//NOTE: some cosmos app (e.g. Gaia) take a --moniker option in the init command
// if the normal init fail, rerun with `--moniker $(hostname)`
hostname, err := os.Hostname()
if err != nil {
return err
}
if err := dockerRun(ctx, p, "init", "--moniker", hostname); err != nil {
return err
}
}

if err := ui.Tree(p.StateDir(), nil); err != nil {
return err
}
Expand Down

0 comments on commit b2b6cc8

Please sign in to comment.