diff options
Diffstat (limited to 'crates/shirabe-external-packages/src/symfony/console/cursor.rs')
| -rw-r--r-- | crates/shirabe-external-packages/src/symfony/console/cursor.rs | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/crates/shirabe-external-packages/src/symfony/console/cursor.rs b/crates/shirabe-external-packages/src/symfony/console/cursor.rs index 811553f..c36f9b5 100644 --- a/crates/shirabe-external-packages/src/symfony/console/cursor.rs +++ b/crates/shirabe-external-packages/src/symfony/console/cursor.rs @@ -181,31 +181,20 @@ impl Cursor { let is_tty_supported = if shirabe_php_shim::function_exists("proc_open") { *IS_TTY_SUPPORTED.get_or_init(|| { - let mut pipes = shirabe_php_shim::PhpMixed::Null; - shirabe_php_shim::php_truthy(&shirabe_php_shim::proc_open( + let mut pipes = indexmap::IndexMap::new(); + shirabe_php_shim::proc_open( "echo 1 >/dev/null", - &vec![ - shirabe_php_shim::PhpMixed::List(vec![ - shirabe_php_shim::PhpMixed::String("file".to_string()), - shirabe_php_shim::PhpMixed::String("/dev/tty".to_string()), - shirabe_php_shim::PhpMixed::String("r".to_string()), - ]), - shirabe_php_shim::PhpMixed::List(vec![ - shirabe_php_shim::PhpMixed::String("file".to_string()), - shirabe_php_shim::PhpMixed::String("/dev/tty".to_string()), - shirabe_php_shim::PhpMixed::String("w".to_string()), - ]), - shirabe_php_shim::PhpMixed::List(vec![ - shirabe_php_shim::PhpMixed::String("file".to_string()), - shirabe_php_shim::PhpMixed::String("/dev/tty".to_string()), - shirabe_php_shim::PhpMixed::String("w".to_string()), - ]), + &[ + shirabe_php_shim::Descriptor::File("/dev/tty".to_string(), "r".to_string()), + shirabe_php_shim::Descriptor::File("/dev/tty".to_string(), "w".to_string()), + shirabe_php_shim::Descriptor::File("/dev/tty".to_string(), "w".to_string()), ], &mut pipes, None, None, None, - )) + ) + .is_ok() }) } else { false |
