Skip to content

Configuration in env vars interprets "true" as a boolean, not a string #7780

Closed
@alexcrichton

Description

@alexcrichton

This is an unfortunate regression from 1.39.0, but this command will now return an error:

$ export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER=true 
$ cargo build
error: data did not match any variant of untagged enum Target

where nightly now returns:

$ export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER=true 
$ cargo +nightly build
error: error in environment variable `CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER`: could not load config key `target.x86_64-unknown-linux-gnu.runner`: error in environment variable `CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER`: could not load config key ` target.x86_64-unknown-linux-gnu.runner`: failed to deserialize, expected a string or array of strings: data did not match any variant of untagged enum Target

This is a bit unfortunate but not necessarily the end of the world. Wanted to make sure it was written down though!

If others run into this I think we may want to pursue a fix, but if no one else runs into this then I think it's fine to close this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-configurationArea: cargo config files and env vars

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions