mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-10-31 18:52:29 +00:00
fix(ocaml): Stop new line being included in ocaml version (#1479)
This fixes a regression in the ocaml module that caused the excess whitespace to not be trimmed from the version.
This commit is contained in:
parent
133574ab09
commit
15bc9fa210
@ -50,7 +50,7 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
|
||||
_ => None,
|
||||
})
|
||||
.map(|variable| match variable {
|
||||
"version" => Some(Ok(format!("v{}", &ocaml_version))),
|
||||
"version" => Some(Ok(format!("v{}", &ocaml_version.trim()))),
|
||||
_ => None,
|
||||
})
|
||||
.parse(None)
|
||||
|
@ -84,11 +84,11 @@ active boot switches: -d:release\n",
|
||||
stderr: String::default(),
|
||||
}),
|
||||
"ocaml -vnum" => Some(CommandOutput {
|
||||
stdout: String::from("4.10.0"),
|
||||
stdout: String::from("4.10.0\n"),
|
||||
stderr: String::default(),
|
||||
}),
|
||||
"esy ocaml -vnum" => Some(CommandOutput {
|
||||
stdout: String::from("4.08.1"),
|
||||
stdout: String::from("4.08.1\n"),
|
||||
stderr: String::default(),
|
||||
}),
|
||||
"php -nr echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION.'.'.PHP_RELEASE_VERSION;" => {
|
||||
|
Loading…
Reference in New Issue
Block a user