aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/command/exec_command.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-12 01:01:35 +0900
committernsfisis <nsfisis@gmail.com>2026-06-12 01:01:43 +0900
commit1e44f5723e4c0e0903d00a61f254901e612fe5e1 (patch)
tree9c2e1eec364bbf6418a4072ee7767b04c3df0297 /crates/shirabe/src/command/exec_command.rs
parentddf0a624145b618c05c2ee47414545b99b685f37 (diff)
downloadphp-shirabe-1e44f5723e4c0e0903d00a61f254901e612fe5e1.tar.gz
php-shirabe-1e44f5723e4c0e0903d00a61f254901e612fe5e1.tar.zst
php-shirabe-1e44f5723e4c0e0903d00a61f254901e612fe5e1.zip
feat(symfony-console): port Symfony Console and make the workspace compile
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/command/exec_command.rs')
-rw-r--r--crates/shirabe/src/command/exec_command.rs20
1 files changed, 14 insertions, 6 deletions
diff --git a/crates/shirabe/src/command/exec_command.rs b/crates/shirabe/src/command/exec_command.rs
index 3aec024..3c9cee2 100644
--- a/crates/shirabe/src/command/exec_command.rs
+++ b/crates/shirabe/src/command/exec_command.rs
@@ -49,8 +49,12 @@ impl ExecCommand {
return Ok(());
}
- if input.borrow().get_argument("binary").as_string().is_some()
- || input.borrow().get_option("list").as_bool().unwrap_or(false)
+ if input.borrow().get_argument("binary")?.as_string().is_some()
+ || input
+ .borrow()
+ .get_option("list")?
+ .as_bool()
+ .unwrap_or(false)
{
return Ok(());
}
@@ -82,8 +86,12 @@ impl ExecCommand {
) -> Result<i64> {
let composer = self.require_composer(None, None)?;
- if input.borrow().get_option("list").as_bool().unwrap_or(false)
- || input.borrow().get_argument("binary").as_string().is_none()
+ if input
+ .borrow()
+ .get_option("list")?
+ .as_bool()
+ .unwrap_or(false)
+ || input.borrow().get_argument("binary")?.as_string().is_none()
{
let bins = self.get_binaries(true)?;
if bins.is_empty() {
@@ -115,7 +123,7 @@ impl ExecCommand {
let binary = input
.borrow()
- .get_argument("binary")
+ .get_argument("binary")?
.as_string()
.unwrap_or("")
.to_string();
@@ -141,7 +149,7 @@ impl ExecCommand {
let args = input
.borrow()
- .get_argument("args")
+ .get_argument("args")?
.as_list()
.map(|l| {
l.iter()