You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the current user does not own every file in the current repository, such as artifacts owned by a docker container, cargo watch errors out even if the directory in question is explicitly ignored.
See this repo for reproduction code. Readme of that repo copied below:
Reproduction
Clone the repo linked above. Then, run the following commands:
cargo binstall cargo-watch
docker compose up -d mongodb
cargo watch -- cargo run or just cargo watch
Expected behavior
cargo watch should know to ignore the ignored artifacts, per the documentation in cargo watch --help, which states:
By default, the workspace directories of your project and all local dependencies are watched, except for the target/ and .git/ folders. Your .ignore and .gitignore files are used to filter paths.
Actual behavior
Observe the error: Error: I/O error: Permission denied (os error 13), despite .gitignore ignoring that directory.
Notes
Tested with cargo-watch 8.5.2
Notes
While an argument can be made that users must go through extra steps to ensure that e.g. container artifacts are owned by the current user, and not by the container's root, some users may want to leave behavior default, and regardless cargo watch behavior ought to align with its documented claim
The text was updated successfully, but these errors were encountered:
Yeah, known issue. Use watchexec for now, which handles this relatively correctly, and will do even better in a future update. Quite busy but I'm planning to bring the improvement over to cargo-watch in Q3/Q4.
Overview
If the current user does not own every file in the current repository, such as artifacts owned by a docker container,
cargo watch
errors out even if the directory in question is explicitly ignored.See this repo for reproduction code. Readme of that repo copied below:
Reproduction
Clone the repo linked above. Then, run the following commands:
cargo binstall cargo-watch
docker compose up -d mongodb
cargo watch -- cargo run
or justcargo watch
Expected behavior
cargo watch
should know to ignore the ignored artifacts, per the documentation incargo watch --help
, which states:Actual behavior
Observe the error:
Error: I/O error: Permission denied (os error 13)
, despite.gitignore
ignoring that directory.Notes
Tested with
cargo-watch 8.5.2
Notes
While an argument can be made that users must go through extra steps to ensure that e.g. container artifacts are owned by the current user, and not by the container's
root
, some users may want to leave behavior default, and regardlesscargo watch
behavior ought to align with its documented claimThe text was updated successfully, but these errors were encountered: