Accessing environment variables from config.toml

Is there a way to access environment variables from the config.toml file?
Specifically, I'm looking for a way to set an env variable to be the current $CARGO_TARGET_DIR.
Right now I have in my config.toml:

[env]
MY_VAR={ value = "target/debug", relative = true, force = true}

But this obviously fails if the user is building with --release.
Ideally I want something like

[env]
MY_VAR={ value = "$CARGO_TARGET_DIR", relative = true, force = true}

but this doesn't work.
Thank you in advance for your help!

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.