diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-19 21:46:01 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-19 21:46:08 +0900 |
| commit | 5e31fa33c3b5cf726a57a063b8e7a070869250fe (patch) | |
| tree | 98522466966fa7df483cad174ab5fc03db39bc09 /crates/shirabe/src/command/run_script_command.rs | |
| parent | c839244d8d09f3036ebfee8eef7eb6b147e593ab (diff) | |
| download | php-shirabe-5e31fa33c3b5cf726a57a063b8e7a070869250fe.tar.gz php-shirabe-5e31fa33c3b5cf726a57a063b8e7a070869250fe.tar.zst php-shirabe-5e31fa33c3b5cf726a57a063b8e7a070869250fe.zip | |
fix(compile): fix more random compile errors
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/command/run_script_command.rs')
| -rw-r--r-- | crates/shirabe/src/command/run_script_command.rs | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/crates/shirabe/src/command/run_script_command.rs b/crates/shirabe/src/command/run_script_command.rs index 5e761f2..6fa7646 100644 --- a/crates/shirabe/src/command/run_script_command.rs +++ b/crates/shirabe/src/command/run_script_command.rs @@ -1,8 +1,8 @@ //! ref: composer/src/Composer/Command/RunScriptCommand.php use anyhow::Result; -use shirabe_external_packages::symfony::console::input::input_interface::InputInterface; -use shirabe_external_packages::symfony::console::output::output_interface::OutputInterface; +use shirabe_external_packages::symfony::component::console::input::input_interface::InputInterface; +use shirabe_external_packages::symfony::component::console::output::output_interface::OutputInterface; use shirabe_php_shim::{InvalidArgumentException, PhpMixed, RuntimeException}; use crate::command::base_command::{BaseCommand, BaseCommandData, HasBaseCommandData}; @@ -47,48 +47,60 @@ impl RunScriptCommand { self.set_name("run-script") .set_aliases(&["run".to_string()]) .set_description("Runs the scripts defined in composer.json") - .set_definition(vec![ + .set_definition(&[ // TODO(cli-completion): script-name completion was provided via a closure suggesting runtime script names InputArgument::new( "script", Some(InputArgument::OPTIONAL), "Script name to run.", None, - ), + ) + .unwrap() + .into(), InputArgument::new( "args", Some(InputArgument::IS_ARRAY | InputArgument::OPTIONAL), "", None, - ), + ) + .unwrap() + .into(), InputOption::new( "timeout", None, Some(InputOption::VALUE_REQUIRED), "Sets script timeout in seconds, or 0 for never.", None, - ), + ) + .unwrap() + .into(), InputOption::new( "dev", None, Some(InputOption::VALUE_NONE), "Sets the dev mode.", None, - ), + ) + .unwrap() + .into(), InputOption::new( "no-dev", None, Some(InputOption::VALUE_NONE), "Disables the dev mode.", None, - ), + ) + .unwrap() + .into(), InputOption::new( "list", Some(PhpMixed::String("l".to_string())), Some(InputOption::VALUE_NONE), "List scripts.", None, - ), + ) + .unwrap() + .into(), ]) .set_help( "The <info>run-script</info> command runs scripts defined in composer.json:\n\n\ @@ -238,7 +250,6 @@ impl RunScriptCommand { let mut result: Vec<(String, String)> = vec![]; for (name, _script) in scripts { let description = self - .inner .get_application() .find(&name) .map(|cmd| cmd.get_description().unwrap_or("").to_string()) |
