From 72a66ad9d2a3a8407052f4f9c1ed2eba6779f104 Mon Sep 17 00:00:00 2001 From: kthbit Date: Sat, 12 Aug 2017 08:39:35 -0500 Subject: [PATCH] Do not assume we are on Linux and have head, tail, and awk commands available. Instead, parse the output in PHP. --- src/Composer/Repository/Vcs/FossilDriver.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Composer/Repository/Vcs/FossilDriver.php b/src/Composer/Repository/Vcs/FossilDriver.php index e0abd10fc..961e696bf 100644 --- a/src/Composer/Repository/Vcs/FossilDriver.php +++ b/src/Composer/Repository/Vcs/FossilDriver.php @@ -140,9 +140,10 @@ class FossilDriver extends VcsDriver */ public function getChangeDate($identifier) { - $this->process->execute(sprintf('fossil finfo composer.json | head -n 2 | tail -n 1 | awk \'{print $1}\''), $output, $this->checkoutDir); - - return new \DateTime(trim($output), new \DateTimeZone('UTC')); + $this->process->execute('fossil finfo -b -n 1 composer.json', $output, $this->checkoutDir); + list($ckout, $date, $message) = explode(' ', trim($output), 3); + + return new \DateTime($date, new \DateTimeZone('UTC')); } /**