Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
pietern committed Jun 25, 2024
1 parent f681c0f commit 247ae2d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bundle/config/mutator/translate_paths.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (t *translateContext) rewritePath(
return nil
}

// Local path must be contained in the sync root.
// Local path must be contained in the bundle root.
// If it isn't, it won't be synchronized into the workspace.
localRelPath, err := filepath.Rel(t.b.RootPath, localPath)
if err != nil {
Expand Down Expand Up @@ -209,17 +209,17 @@ func (t *translateContext) rewriteRelativeTo(p dyn.Path, v dyn.Value, fn rewrite
}

func (m *translatePaths) Apply(_ context.Context, b *bundle.Bundle) diag.Diagnostics {
r := &translateContext{
t := &translateContext{
b: b,
seen: make(map[string]string),
}

err := b.Config.Mutate(func(v dyn.Value) (dyn.Value, error) {
var err error
for _, fn := range []func(dyn.Value) (dyn.Value, error){
r.applyJobTranslations,
r.applyPipelineTranslations,
r.applyArtifactTranslations,
t.applyJobTranslations,
t.applyPipelineTranslations,
t.applyArtifactTranslations,
} {
v, err = fn(v)
if err != nil {
Expand Down

0 comments on commit 247ae2d

Please sign in to comment.