kornelski / cargo-deb

Make Debian packages directly from Rust/Cargo projects
https://lib.rs/cargo-deb
MIT License
431 stars 52 forks source link

add option to point to pre-built target location for when build is not in current directory #63

Closed aaronenberg closed 1 year ago

aaronenberg commented 1 year ago

I'd really love if cargo-deb supported this workflow:

cargo build --release --target-dir ~/foo
cargo deb --no-build --target-dir ~/foo

Any problems with this?

aaronenberg commented 1 year ago

I see that cargo-deb respects CARGO_TARGET_DIR. So I can set CARGO_TARGET_DIR=~/foo to get my desired behavior. Still it would be nice to have it as a command-line option.

kornelski commented 1 year ago

The env var probably works by being picked by cargo metadata. I'm not sure if it's worth complexity to support it also as an argument. You're the first person I've seen who uses the command-line arg instead of the env var.

aaronenberg commented 1 year ago

That's fair. I'll probably start using the env var too. Thanks for considering