Skip to content

Commit

Permalink
Fixed the containerfile not found during remote build.
Browse files Browse the repository at this point in the history
[NO NEW TESTS NEEDED]

Signed-off-by: Shion Tanaka <[email protected]>
  • Loading branch information
tnk4on committed Nov 30, 2021
1 parent 7324d94 commit 0ddb094
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/bindings/images/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,11 @@ func Build(ctx context.Context, containerFiles []string, options entities.BuildO
}
c = tmpFile.Name()
}
cfDir := filepath.Dir(c)
if absDir, err := filepath.EvalSymlinks(cfDir); err == nil {
name := filepath.ToSlash(strings.TrimPrefix(c, cfDir+string(filepath.Separator)))
c = filepath.Join(absDir, name)
}
containerfile, err := filepath.Abs(c)
if err != nil {
logrus.Errorf("Cannot find absolute path of %v: %v", c, err)
Expand Down

0 comments on commit 0ddb094

Please sign in to comment.