1
0
Fork 0

Issue #4512 Set reference in path repository

pull/4515/head
Joel Wurtz 2015-10-18 11:57:43 +02:00
parent a54f84f05f
commit 7f42fe4c10
1 changed files with 2 additions and 0 deletions

View File

@ -121,6 +121,8 @@ class PathRepository extends ArrayRepository
} }
if (is_dir($path.'/.git') && 0 === $this->process->execute('git log -n1 --pretty=%H', $output, $path)) { if (is_dir($path.'/.git') && 0 === $this->process->execute('git log -n1 --pretty=%H', $output, $path)) {
$package['dist']['reference'] = trim($output); $package['dist']['reference'] = trim($output);
} else {
$package['dist']['reference'] = sha1($json);
} }
$package = $this->loader->load($package); $package = $this->loader->load($package);