瀏覽代碼

Add newline at the end of formatted jsons

Jordi Boggiano 13 年之前
父節點
當前提交
d1d9c715c9
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Composer/Json/JsonFile.php

+ 1 - 1
src/Composer/Json/JsonFile.php

@@ -104,7 +104,7 @@ class JsonFile
                 );
             }
         }
-        file_put_contents($this->path, static::encode($hash, $options));
+        file_put_contents($this->path, static::encode($hash, $options). ($options & JSON_PRETTY_PRINT ? "\n" : ''));
     }
 
     /**