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> {
272272 bail ! ( "Failed to call PHP: {:?}" , cmd) ;
273273 }
274274 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 ( ) ) ;
276276 if !ext_dir. is_dir ( ) {
277277 if ext_dir. exists ( ) {
278278 bail ! (
@@ -302,7 +302,7 @@ fn get_php_ini() -> AResult<PathBuf> {
302302 bail ! ( "Failed to call PHP: {:?}" , cmd) ;
303303 }
304304 let stdout = String :: from_utf8_lossy ( & cmd. stdout ) ;
305- let ini = PathBuf :: from ( & * stdout) ;
305+ let ini = PathBuf :: from ( stdout. rsplit ( '\n' ) . next ( ) . unwrap ( ) ) ;
306306 if !ini. is_file ( ) {
307307 bail ! (
308308 "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