diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-11 02:39:35 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-11 02:39:35 +0900 |
| commit | 6ae7e0d4b3eaf20e2d2cd3d000cf61ab0c9b6e83 (patch) | |
| tree | e39261f4aa7314fe8c75142670c76591cdaccb92 /crates/shirabe/src/command/create_project_command.rs | |
| parent | 5d3232a80be4b989e89cc7ae4e3642cc5acae030 (diff) | |
| download | php-shirabe-6ae7e0d4b3eaf20e2d2cd3d000cf61ab0c9b6e83.tar.gz php-shirabe-6ae7e0d4b3eaf20e2d2cd3d000cf61ab0c9b6e83.tar.zst php-shirabe-6ae7e0d4b3eaf20e2d2cd3d000cf61ab0c9b6e83.zip | |
feat(console): resolve phase-b TODOs in doRun and IO wiring
Wire up ConsoleIO with HelperSet/QuestionHelper, register the
ErrorHandler with the IO instance, and fall back to a default output
in run(). Replace resolved phase-b TODOs across the console, command,
io, factory, installer, dependency_resolver, and util modules; reclassify
the remaining blockers (typed Symfony command registry, stdin resource
caching) as phase-c.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/command/create_project_command.rs')
| -rw-r--r-- | crates/shirabe/src/command/create_project_command.rs | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/crates/shirabe/src/command/create_project_command.rs b/crates/shirabe/src/command/create_project_command.rs index bf00371..ba384d5 100644 --- a/crates/shirabe/src/command/create_project_command.rs +++ b/crates/shirabe/src/command/create_project_command.rs @@ -768,14 +768,16 @@ impl CreateProjectCommand { indexmap::IndexMap::new(), ); if repositories.is_none() { - // TODO(phase-b): default_repos needs &mut RepositoryManager but we hold &RepositoryManager. - let _ = rm; repository_set.add_repository(crate::repository::RepositoryInterfaceHandle::new( CompositeRepository::new( - RepositoryFactory::default_repos(Some(io.clone()), Some(config.clone()), None)? - .into_iter() - .map(|(_, v)| v) - .collect(), + RepositoryFactory::default_repos( + Some(io.clone()), + Some(config.clone()), + Some(&mut rm.borrow_mut()), + )? + .into_iter() + .map(|(_, v)| v) + .collect(), ), ))?; } else { @@ -903,6 +905,7 @@ impl CreateProjectCommand { let mut signal_handler: Option<SignalHandler> = None; if let Some(real_dir) = realpath(&directory) { let real_dir_clone = real_dir.clone(); + let io_for_signal = io.clone(); signal_handler = Some(SignalHandler::create( vec![ SignalHandler::SIGINT.to_string(), @@ -910,8 +913,11 @@ impl CreateProjectCommand { SignalHandler::SIGHUP.to_string(), ], Box::new(move |signal: String, handler: &SignalHandler| { - // TODO(phase-b): self.get_io().write_error(...) inside the closure - let _ = &signal; + io_for_signal.write_error3( + &format!("Received {}, aborting", signal), + true, + crate::io::DEBUG, + ); let mut fs = Filesystem::new(None); fs.remove_directory(&real_dir_clone).ok(); handler.exit_with_last_signal(); |
