diff --git a/cli/cmd/initnodes.go b/cli/cmd/initnodes.go index 49e6e308e..5408132f7 100644 --- a/cli/cmd/initnodes.go +++ b/cli/cmd/initnodes.go @@ -87,6 +87,14 @@ func InitNodes(ctx context.Context, cfg InitConfig) error { return errors.New("required flag --moniker not set") } + if !filepath.IsAbs(cfg.Home) { + absPath, err := filepath.Abs(cfg.Home) + if err != nil { + return errors.Wrap(err, "convert path") + } + cfg.Home = absPath + } + if cfg.Home == "" { var err error cfg.Home, err = homeDir(cfg.Network)