You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build output calling the rust buildpack followed by the bash "print PATH" buildpack:
$ pack build debugging-app --path . --buildpack /private/tmp/ba6c8b19618d86f52e85c8c8896d5a9e/first-path-buildpack-rust/packaged/x86_64-unknown-linux-musl/debug/libcnb_first --buildpack ./echo-path-buildpack --platform linux/amd64
24: Pulling from heroku/builder
Digest: sha256:770cbacea87ae3e06c3773723015b03706f98f78b31be4fd1b963c9ba861eb04
Status: Image is up to date for heroku/builder:24
24: Pulling from heroku/heroku
Digest: sha256:9483dc324ebd0615f936808da8da14c401c790f96b13a331208c4513a57c2051
Status: Image is up to date for heroku/heroku:24
Warning: Builder is trusted but additional modules were added; using the untrusted (5 phases) build flow
0.20.5: Pulling from buildpacksio/lifecycle
Digest: sha256:3274fe28594f484240fc3f17e46b7b45e304830e544dcdd82ce19472d159ef71
Status: Image is up to date for buildpacksio/lifecycle:0.20.5
===> ANALYZING
[analyzer] Restoring data for SBOM from previous image
===> DETECTING
[detector] libcnb/first 0.1.0
[detector] examples/echo-path 0.0.1
===> RESTORING
===> BUILDING
[builder] Hello World!
[builder] The build is running on: linux (amd64)!
[builder] read_env: PATH="/layers/libcnb_first/0001_first/bin:/manually_set_path_prepend/bin"
[builder] PATH=/manually_set_path_prepend/bin:/layers/libcnb_first/0001_first/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
===> EXPORTING
[exporter] Reusing layer 'libcnb/first:0001_first'
[exporter] Reusing layer 'buildpacksio/lifecycle:launch.sbom'
[exporter] Reused 1/1 app layer(s)
[exporter] Reusing layer 'buildpacksio/lifecycle:launcher'
[exporter] Reusing layer 'buildpacksio/lifecycle:config'
[exporter] Adding label 'io.buildpacks.lifecycle.metadata'
[exporter] Adding label 'io.buildpacks.build.metadata'
[exporter] Adding label 'io.buildpacks.project.metadata'
[exporter] no default process type
[exporter] Saving debugging-app...
[exporter] *** Images (9270e5dbb797):
[exporter] debugging-app
Successfully built image debugging-app
Lifecycle and libcnb.rs both auto-add a
<layer-name>/bin
to thePATH
Expected
Writing to a layer and then calling
read_env
should return the same environment modification as lifecycle will produceActual
Writing a layer and reading it in Rust produces places the
<layer-name/bin>
on the front of a manual path prepend:Lifecycle places
<layer-name>/bin
at the end (of a path prepend):Reproduction
Build output calling the rust buildpack followed by the bash "print PATH" buildpack:
Beyond fixing this in libcnb, it's unclear if this behavior is in the Spec or not https://github.com/buildpacks/spec/blob/main/buildpack.md#layer-paths. If not, we should document it.
The text was updated successfully, but these errors were encountered: