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 directory names #230

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions starport/services/serve/plugin-stargate.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func (p *stargatePlugin) PostInit() error {
if err != nil {
return err
}
path := filepath.Join(home, p.app.nd(), "config/app.toml")
path := filepath.Join(home, fmt.Sprintf(".%s/config/app.toml", p.app.nd()))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, as I'm aware, Stargate uses non-dot files to keep app data under home. Maybe I'm missing something, have you noticed that if any dot files generated by a Stargate app?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, I find that it's we changed the directory ourself, I tried with a new test project, no issue exists, I'll close this.

config, err := toml.LoadFile(path)
if err != nil {
return err
Expand Down Expand Up @@ -122,5 +122,5 @@ func (p *stargatePlugin) StoragePaths() []string {
}

func (p *stargatePlugin) GenesisPath() string {
return fmt.Sprintf("%s/config/genesis.json", p.app.nd())
return fmt.Sprintf(".%s/config/genesis.json", p.app.nd())
}
3 changes: 3 additions & 0 deletions starport/services/serve/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,9 @@ func (s *starportServe) buildSteps(ctx context.Context, conf starportconf.Config
"mynode",
"--chain-id", s.app.nd(),
),
step.PreExec(func() error {
return xos.RemoveAllUnderHome(fmt.Sprintf(".%s", s.app.nd()))
}),
step.PostExec(func(err error) error {
// overwrite Genesis with user configs.
if err != nil {
Expand Down