From 86a96dd157d88397ed56973cfd6990e2126877bb Mon Sep 17 00:00:00 2001 From: Marek Mencl Date: Tue, 2 Jan 2024 13:37:28 +0100 Subject: [PATCH] fix: overriding cli argument --cache-directory --- src/Plugins/Cache.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Plugins/Cache.php b/src/Plugins/Cache.php index f731e883..682b938c 100644 --- a/src/Plugins/Cache.php +++ b/src/Plugins/Cache.php @@ -30,10 +30,12 @@ final class Cache implements HandlesArguments */ public function handleArguments(array $arguments): array { - $arguments = $this->pushArgument( - sprintf('--cache-directory=%s', realpath(self::TEMPORARY_FOLDER)), - $arguments - ); + if (! $this->hasArgument('--cache-directory', $arguments)) { + $arguments = $this->pushArgument( + sprintf('--cache-directory=%s', realpath(self::TEMPORARY_FOLDER)), + $arguments + ); + } if (! $this->hasArgument('--parallel', $arguments)) { return $this->pushArgument('--cache-result', $arguments);