File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -272,7 +272,7 @@ fn get_ext_dir() -> AResult<PathBuf> {
272
272
bail ! ( "Failed to call PHP: {:?}" , cmd) ;
273
273
}
274
274
let stdout = String :: from_utf8_lossy ( & cmd. stdout ) ;
275
- let ext_dir = PathBuf :: from ( & * stdout) ;
275
+ let ext_dir = PathBuf :: from ( stdout. rsplit ( '\n' ) . next ( ) . unwrap ( ) ) ;
276
276
if !ext_dir. is_dir ( ) {
277
277
if ext_dir. exists ( ) {
278
278
bail ! (
@@ -302,7 +302,7 @@ fn get_php_ini() -> AResult<PathBuf> {
302
302
bail ! ( "Failed to call PHP: {:?}" , cmd) ;
303
303
}
304
304
let stdout = String :: from_utf8_lossy ( & cmd. stdout ) ;
305
- let ini = PathBuf :: from ( & * stdout) ;
305
+ let ini = PathBuf :: from ( stdout. rsplit ( '\n' ) . next ( ) . unwrap ( ) ) ;
306
306
if !ini. is_file ( ) {
307
307
bail ! (
308
308
"php.ini does not exist or is not a file at the given path: {:?}" ,
You can’t perform that action at this time.
0 commit comments