Closed domenicquirl closed 1 year ago
While this is an issue, I also want to say that cargo-deb
generally handles the setup very well otherwise. Including some very nice things like automatically resolving the path of assets
that are targets - that was very welcome, so thanks for 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 CARGO_HOME
as well, but you can let me know how you'd like to proceed there.
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).