-
Notifications
You must be signed in to change notification settings - Fork 48
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
cargo deb
looks for target-specific configuration in target directory
#84
Comments
While this is an issue, I also want to say that |
You're right that target dir shouldn't be used for config, and that conflated it with manifest dir. Can you make a PR? |
Opened #85 with a fix. It includes looking into |
Thank you |
Hi,
cargo deb
doesn't seem to pick up a target-specificstrip
command if I set$CARGO_TARGET_DIR
to a non-local folder (such as/target
or whatever). I'd expect this to not influence loading a project's config, ascargo
loads from the project directory (and up) or$CARGO_HOME
, not$CARGO_TARGET_DIR
, and it picks up config values likealias
es just fine with this setup.I think what might be happening is that
Config::cargo_config
passesself.target_dir
toCargoConfig::new
, which expects aproject_path
instead.It also seems a little inconsistent to read
$HOME
from the environment to check a user-wide configuration, but not$CARGO_HOME
(the Cargo Book lists$CARGO_HOME/config.toml
as the global configuration directory, which the current behaviour matches for the default cargo home directory, I assume you already knew this). At least, that makes it quite annoying to work around this, because I have to actually put the config inside the target directory (the build itelf is running inside a Docker container).The text was updated successfully, but these errors were encountered: