Skip to content

Commit 179a831

Browse files
committed
Fixed parsing a output of du command in Repository::getSize()
1 parent d2b4b06 commit 179a831

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Gitonomy/Git/Repository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ public function getSize()
306306
throw new \RuntimeException(sprintf('Unable to compute size: ', $process->getErrorOutput()));
307307
}
308308

309-
if (!preg_match('/(\d+)\s+total$/', $process->getOutput(), $vars)) {
309+
if (!preg_match('/(\d+)\s+total$/', trim($process->getOutput()), $vars)) {
310310
throw new \RuntimeException('Unable to parse repository size output');
311311
}
312312

0 commit comments

Comments
 (0)