Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to pass an environment variable to target.runner #10445

Closed
leap0x7b opened this issue Mar 2, 2022 · 2 comments
Closed

Unable to pass an environment variable to target.runner #10445

leap0x7b opened this issue Mar 2, 2022 · 2 comments
Labels
A-configuration Area: cargo config files and env vars A-environment-variables Area: environment variables C-bug Category: bug

Comments

@leap0x7b
Copy link

leap0x7b commented Mar 2, 2022

Problem

error: could not execute process `$CARGO run --package runner -- target/x86_64-arius/debug/arius` (never executed)

Steps

[target]
runner = '$CARGO run --package runner --'

Possible Solution(s)

No response

Notes

No response

Version

cargo 1.61.0-nightly (ea2a21c 2022-02-15)
release: 1.61.0-nightly
commit-hash: ea2a21c994ca1e4d4c49412827b3cf4dcb158b1d
commit-date: 2022-02-15
host: aarch64-unknown-linux-gnu
libgit2: 1.3.0 (sys:0.13.23 vendored)
libcurl: 7.80.0-DEV (sys:0.4.51+curl-7.80.0 vendored ssl:OpenSSL/1.1.1m)
os: Arch Linux Rolling Release [64-bit]
@leap0x7b leap0x7b added the C-bug Category: bug label Mar 2, 2022
@weihanglo
Copy link
Member

Hi. Assumed you are referring to target.<triple>.runner config. At this moment, the implementation is not able to expand environment variables. Actually, as far as I know, to keep it simple, cargo tries to avoid duplicating what a shell should do.

As a workaround, if you know the value of the environment variable beforehand, you might want to configure it in env configuration. (Note that it doesn't support shell expansion either.)

@weihanglo weihanglo added A-configuration Area: cargo config files and env vars A-environment-variables Area: environment variables labels Mar 3, 2022
@weihanglo
Copy link
Member

Going to close this in favour of #10789, which I left more alternatives there.
Thanks for your report anyway!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-configuration Area: cargo config files and env vars A-environment-variables Area: environment variables C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

2 participants