fix: return better error when using pack+python (#2904)

Signed-off-by: Matej Vašek <mvasek@redhat.com>
This commit is contained in:
Matej Vašek 2025-07-01 11:20:53 +02:00 committed by GitHub
parent 58fb81a41a
commit dfe2109f56
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -120,6 +120,10 @@ var DefaultLifecycleImage = "docker.io/buildpacksio/lifecycle:553c041"
// Build the Function at path.
func (b *Builder) Build(ctx context.Context, f fn.Function, platforms []fn.Platform) (err error) {
if f.Runtime == "python" {
return fmt.Errorf("python is not currently supported with pack builder (use host or s2i builder instead")
}
if len(platforms) != 0 {
return errors.New("the pack builder does not support specifying target platforms directly")
}