Skip to content

Commit

Permalink
Log a warning when failing to add a replace directive label, rather t…
Browse files Browse the repository at this point in the history
…han stopping with a fatal error
  • Loading branch information
SpangleLabs committed Jul 1, 2024
1 parent 34dd389 commit 63a49eb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sync/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@ import (
"github.com/please-build/puku/edit"
"github.com/please-build/puku/graph"
"github.com/please-build/puku/licences"
"github.com/please-build/puku/logging"
"github.com/please-build/puku/please"
"github.com/please-build/puku/proxy"
)

var log = logging.GetLogger()

type syncer struct {
plzConf *please.Config
graph *graph.Graph
Expand Down Expand Up @@ -124,7 +127,7 @@ func (s *syncer) syncModFile(conf *config.Config, file *build.File, existingRule
if matchingReplace != nil {
err := edit.AddLabel(rule, REPLACE_LABEL)
if err != nil {
return fmt.Errorf("failed to add replace label to %v: %v", req.Mod.Path, err)
log.Warningf("Failed to add replace label to %v: %v", req.Mod.Path, err)
}
}
// No other changes needed
Expand Down

0 comments on commit 63a49eb

Please sign in to comment.