mirror of
https://github.com/starship/starship
synced 2024-09-05 07:44:44 +00:00
Fix PHP version including error messages (#1317)
PHP will output error messages when displaying the version if, for example, there is something wrong with the local `php.ini` file. Have updated the command used to get the PHP version to only use the default PHP config.
This commit is contained in:
parent
6ecabdfee4
commit
c182572796
|
@ -22,7 +22,7 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
|
|||
match utils::exec_cmd(
|
||||
"php",
|
||||
&[
|
||||
"-r",
|
||||
"-nr",
|
||||
"echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION.'.'.PHP_RELEASE_VERSION;",
|
||||
],
|
||||
) {
|
||||
|
|
|
@ -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(),
|
||||
|
|
Loading…
Reference in a new issue