Skip to content

Commit

Permalink
fix local store write
Browse files Browse the repository at this point in the history
  • Loading branch information
redradrat committed Oct 20, 2020
1 parent a0b4bce commit f7cfbbb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/repositories/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,14 @@ type Store interface {
type LocalStore struct{}

func (l LocalStore) WriteRegistry(registry RepoRegistry) error {
panic("implement me")
b, err := json.MarshalIndent(registry, "", " ")
if err != nil {
return err
}
if err := ioutil.WriteFile(RepoRegistryPath, b, 0644); err != nil {
return err
}
return nil
}

func (l LocalStore) ReadRegistry() (*RepoRegistry, error) {
Expand Down

0 comments on commit f7cfbbb

Please sign in to comment.