Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ fn get_ext_dir() -> AResult<PathBuf> {
bail!("Failed to call PHP: {:?}", cmd);
}
let stdout = String::from_utf8_lossy(&cmd.stdout);
let ext_dir = PathBuf::from(&*stdout);
let ext_dir = PathBuf::from(stdout.rsplit('\n').next().unwrap());
if !ext_dir.is_dir() {
if ext_dir.exists() {
bail!(
Expand Down Expand Up @@ -302,7 +302,7 @@ fn get_php_ini() -> AResult<PathBuf> {
bail!("Failed to call PHP: {:?}", cmd);
}
let stdout = String::from_utf8_lossy(&cmd.stdout);
let ini = PathBuf::from(&*stdout);
let ini = PathBuf::from(stdout.rsplit('\n').next().unwrap());
if !ini.is_file() {
bail!(
"php.ini does not exist or is not a file at the given path: {:?}",
Expand Down