watchexec / cargo-watch

Watches over your Cargo project's source.
Creative Commons Zero v1.0 Universal
2.78k stars 81 forks source link

cargo watch in release mode? #290

Closed davehorner closed 1 year ago

davehorner commented 1 year ago
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.

passcod commented 1 year ago

This is the third example in the readme:

# Run run with arguments
$ cargo watch -x 'run -- --some-arg'
davehorner commented 1 year ago

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