Skip to content

Commit dfe2109

Browse files
authored
fix: return better error when using pack+python (knative#2904)
Signed-off-by: Matej Vašek <[email protected]>
1 parent 58fb81a commit dfe2109

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/builders/buildpacks/builder.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ var DefaultLifecycleImage = "docker.io/buildpacksio/lifecycle:553c041"
120120

121121
// Build the Function at path.
122122
func (b *Builder) Build(ctx context.Context, f fn.Function, platforms []fn.Platform) (err error) {
123+
if f.Runtime == "python" {
124+
return fmt.Errorf("python is not currently supported with pack builder (use host or s2i builder instead")
125+
}
126+
123127
if len(platforms) != 0 {
124128
return errors.New("the pack builder does not support specifying target platforms directly")
125129
}

0 commit comments

Comments
 (0)