Jelajahi Sumber

Trim output before splitting lines to avoid blank entries, closes #1978

Jordi Boggiano 12 tahun lalu
induk
melakukan
65dae83ee6
1 mengubah file dengan 2 tambahan dan 0 penghapusan
  1. 2 0
      src/Composer/Util/ProcessExecutor.php

+ 2 - 0
src/Composer/Util/ProcessExecutor.php

@@ -71,6 +71,8 @@ class ProcessExecutor
 
     public function splitLines($output)
     {
+        $output = trim($output);
+
         return ((string) $output === '') ? array() : preg_split('{\r?\n}', $output);
     }