Skip to content
Merged
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
2 changes: 1 addition & 1 deletion evolve/cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ func prependFieldToGenesis(genesisPath, fieldName, fieldValue string) error {
buf.Write(data[insertPos:])

// Write back to file
if err := os.WriteFile(genesisPath, buf.Bytes(), 0644); err != nil {
if err := os.WriteFile(genesisPath, buf.Bytes(), 0o644); err != nil {
return fmt.Errorf("failed to write genesis file: %w", err)
}

Expand Down
2 changes: 1 addition & 1 deletion evolve/cmd/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func TestPrependFieldToGenesis(t *testing.T) {
tmpDir := t.TempDir()
genesisPath := filepath.Join(tmpDir, "genesis.json")

err := os.WriteFile(genesisPath, []byte(tt.input), 0644)
err := os.WriteFile(genesisPath, []byte(tt.input), 0o644)
assert.NilError(t, err)

err = prependFieldToGenesis(genesisPath, tt.fieldName, tt.fieldValue)
Expand Down
9 changes: 9 additions & 0 deletions evolve/template/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ func commandsStartModify(appPath, binaryName string, version cosmosver.Version)
}`,
}, nil
})
if err != nil {
return err
}

// add the start command flags
content, err = xast.ModifyFunction(content,
Expand Down Expand Up @@ -119,6 +122,9 @@ func commandsGenesisInitModify(appPath, binaryName string) genny.RunFn {

return args, nil
})
if err != nil {
return err
}

return r.File(genny.NewFileS(cmdPath, content))
}
Expand Down Expand Up @@ -151,6 +157,9 @@ func commandsForceInclusionModify(appPath, binaryName string) genny.RunFn {

return args, nil
})
if err != nil {
return err
}

return r.File(genny.NewFileS(cmdPath, content))
}
Expand Down
3 changes: 3 additions & 0 deletions evolve/template/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ func commandsMigrateModify(appPath, binaryName string) genny.RunFn {

return args, nil
})
if err != nil {
return err
}

return r.File(genny.NewFileS(cmdPath, content))
}
Expand Down
Loading