C1: alpha dry run fixes (Ctrl+C in terminal, ignored colour, find singular)
Some checks failed
ci / ci (macos-15) (push) Has been cancelled
ci / ci (ubuntu-24.04) (push) Has been cancelled
ci / ci (windows-2025) (push) Has been cancelled

- Terminal: undo an inherited "ignore Ctrl+C" flag before starting a
  ConPTY shell (lutra_proc::enable_ctrl_c). Lutra started by the lutra
  CLI (CREATE_NEW_PROCESS_GROUP) passed it to every shell, so Ctrl+C
  stopped nothing. Test reruns itself with that flag.
- Engine: an edited .gitignore/.ignore reports TreeChanged for its
  folder, so the tree greys newly ignored files (Add to .gitignore).
- Find: "1 match", "1 file" instead of "1 files".
- docs/alpha-checklist.md: steps corrected after the Windows dry run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
danny 2026-11-02 17:55:58 +01:00
parent 30de747ad6
commit e228d11ef9
11 changed files with 173 additions and 20 deletions

View file

@ -184,6 +184,11 @@ fn spawn_error(e: impl std::fmt::Display) -> TerminalError {
impl Session {
/// Starts a shell in a new pseudo terminal.
///
/// On Windows it first undoes an "ignore Ctrl+C" flag Lutra may have
/// inherited ([`lutra_proc::enable_ctrl_c`]), because the shell and the
/// programs it runs inherit it in turn and Ctrl+C would stop nothing. A
/// failure there is ignored: the shell works without it.
///
/// # Errors
/// [`TerminalError::InvalidSize`] for a size outside `1..=MAX_SIZE`,
/// [`TerminalError::Spawn`] if the pty cannot be created, the program
@ -210,6 +215,8 @@ impl Session {
for (key, value) in &options.env {
cmd.env(key, value);
}
#[cfg(windows)]
let _ = lutra_proc::enable_ctrl_c();
let mut child = pair.slave.spawn_command(cmd).map_err(spawn_error)?;
drop(pair.slave);
#[cfg(windows)]