Skip to content

Environment values should not be VERGEN_IDEMPOTENT_OUTPUT on failure #299

@holly-hacker

Description

@holly-hacker

I am using the following configuration:

pub fn main() {
    vergen::EmitBuilder::builder()
        .idempotent()
        .quiet()
        .all_cargo()
        .all_git()
        .git_describe(true, false, None)
        .all_rustc()
        .emit()
        .unwrap();
}

Due to an error on my end, there was no .git folder in my build environment which means the git env vars could not be populated correctly. However, the value of each git environment value was VERGEN_IDEMPOTENT_OUTPUT which is very unexpected and cost me a lot of time troubleshooting in the wrong direction. Ideally, these should be filled with another value to indicate the error.

I understand that the .quiet() call and lack of .fail_on_error() make this error harder to spot, but I still think the current behavior is very weird.

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