watchexec/cargo-watch

cargo watch in release mode?

davehorner opened this issue · 2 comments

cargo watch --why -x run

I've not had success running cargo watch in release mode, it only runs in debug for me.

cargo watch --why -x run --release
error: Found argument '--release' which wasn't expected, or isn't valid in this context
cargo watch --why -x run -x --release
error: Found argument '--release' which wasn't expected, or isn't valid in this context
watch --why -x run -- --release
[Running '--release']
'--release' is not recognized as an internal or external command,
operable program or batch file.

nothing in the help specifically about it.

cargo watch --why -x "run --release"
[Running 'cargo run --release']

The above works. Closing complete.

This is the third example in the readme:

# Run run with arguments
$ cargo watch -x 'run -- --some-arg'

which is an example of passing arguments. not release mode. it may be clear to others. all set here.