diff --git a/src/modules/php.rs b/src/modules/php.rs index 4cf0b98c..167f2ffd 100644 --- a/src/modules/php.rs +++ b/src/modules/php.rs @@ -22,7 +22,7 @@ pub fn module<'a>(context: &'a Context) -> Option> { match utils::exec_cmd( "php", &[ - "-r", + "-nr", "echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION.'.'.PHP_RELEASE_VERSION;", ], ) { diff --git a/src/utils.rs b/src/utils.rs index 7687a300..7f7e7f4d 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -87,7 +87,7 @@ active boot switches: -d:release\n", stdout: String::from("4.10.0"), stderr: String::default(), }), - "php -r echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION.'.'.PHP_RELEASE_VERSION;" => { + "php -nr echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION.'.'.PHP_RELEASE_VERSION;" => { Some(CommandOutput { stdout: String::from("7.3.8"), stderr: String::default(),