diff --git a/docs/next/en-US/cli.md b/docs/next/en-US/cli.md index 27dbe369ea..cb37b4126d 100644 --- a/docs/next/en-US/cli.md +++ b/docs/next/en-US/cli.md @@ -42,7 +42,7 @@ The Perseus CLI supports watching your local directory for changes when running Notably, the CLI spawns another version of itself as a process group (or `JobObject` on Windows) using the [`command-group`](https://github.com/watchexec/command-group) crate, which allows terminations signals to go to all builder child processes. However, this means that the CLI needs to manually handle termination signals to it to terminate the processes in thr group. This means that, if the CLI terminates improperly (e.g. if you `kill` it), you will very likely end up with build jobs running in the background. Those shouldn't be too problematic, and you probably won't even notice them, but a server process could also be orphaned, which would leave a port occupied. If this happens, use `ps aux | grep perseus` to find the process ID, and then `kill` it by that (e.g. `kill 60850`) on Linux. If possible though, avoiding force-terminating the Perseus CLI. -Right now, the CLI's watching systems will ignore `.perseus/` and `target/`. If you have any other directories that you'd like to ignore, you should use an alternative watching system, like [`entr`](https://github.com/eradman/entr). However, we're willing to add support for this if it's a widely-requested feature, so please feel free to [open an issue](https://github.com/arctic-hen7/perseus/issues/new/choose) if this affects you! +Right now, the CLI's watching systems will ignore `.perseus/`, `target/`, and `.git/`. If you have any other directories that you'd like to ignore, you should use an alternative watching system, like [`entr`](https://github.com/eradman/entr). However, we're willing to add support for this if it's a widely-requested feature, so please feel free to [open an issue](https://github.com/arctic-hen7/perseus/issues/new/choose) if this affects you! Here's an example of watching files with `entr` on Linux: diff --git a/packages/perseus-cli/src/bin/main.rs b/packages/perseus-cli/src/bin/main.rs index 2a2be82938..bbea4e6ecb 100644 --- a/packages/perseus-cli/src/bin/main.rs +++ b/packages/perseus-cli/src/bin/main.rs @@ -139,7 +139,7 @@ async fn core(dir: PathBuf) -> Result { // We want to exclude `target/` and `.perseus/`, otherwise we should watch everything let entry = entry.map_err(|err| WatchError::ReadDirEntryFailed { source: err })?; let name = entry.file_name(); - if name != "target" && name != ".perseus" { + if name != "target" && name != ".perseus" && name != ".git" { watcher .watch(&entry.path(), RecursiveMode::Recursive) .map_err(|err| WatchError::WatchFileFailed {