Skip to content

Commit

Permalink
fix JSON error for existing disco
Browse files Browse the repository at this point in the history
  • Loading branch information
meringu committed Nov 27, 2023
1 parent 28d29a7 commit 7d31f17
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/cmd/publish.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package cmd

import (
"bytes"
"context"
"encoding/json"
"fmt"
Expand Down Expand Up @@ -104,10 +105,13 @@ func publish() error {
}
defer discoveryReader.Close()

_, err = discoveryReader.Read(discoveryContent)
var b bytes.Buffer
_, err = io.Copy(io.Writer(&b), discoveryReader)
if err != nil {
return err
}

discoveryContent = b.Bytes()
}

discoveryContent, err = setDiscoveryProvider(discoveryContent)
Expand Down

0 comments on commit 7d31f17

Please sign in to comment.