Skip to content

Error if BP_NGINX_VERSION is set and no "workspace/buildpack.yml" is present #539

@MischaFrank

Description

@MischaFrank

Expected Behavior

Nginx version can be set via env variable (as recommended in README) without buildpack.yml in project root.

Current Behavior

Error if used with pack and --env BP_NGINX_VERSION=1.22.* without buildpack.yml:

===> DETECTING
======== Output: paketo-buildpacks/nginx@0.13.2 ========
parsing version failed: open /workspace/buildpack.yml: no such file or directory
err: paketo-buildpacks/nginx@0.13.2 (1)

Steps to Reproduce

  1. Create empty project with nginx.conf
  2. Run pack build nginx-test-app:test --env BP_NGINX_VERSION=1.22.1

Possible Solution

Don't try to parse buildpack.yml if BP_NGINX_VERSION is set.
Run detect.go:62-92 in else block.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions