Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 731 Bytes

File metadata and controls

31 lines (22 loc) · 731 Bytes

repro-missing-cargo-env

Minimal reproduction for missing CARGO_PKG_LICENSE, CARGO_PKG_README, and PROFILE environment variables when building under Buck2 via buckal-bundles.

Steps

  1. Migrate to Buck2:

    cargo buckal migrate
  2. Build with Buck2:

    buck2 build //:repro-missing-cargo-env
  3. Observe the build script panic:

    Missing expected environment variable "CARGO_PKG_LICENSE"
    

Expected

The build should succeed. Cargo always sets CARGO_PKG_LICENSE, CARGO_PKG_README, and PROFILE for build scripts, even when empty.

Verify with Cargo

cargo build   # succeeds
cargo run     # prints: License: MIT, Readme: README.md, Profile: debug