From 02d33b4237757e64230f110b70f1c204069fa27b Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Mon, 24 Jul 2017 11:57:44 +0900 Subject: [PATCH] stage context does not clear tmp directory --- src/AppMeta.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AppMeta.php b/src/AppMeta.php index 7a08ced..9b38599 100644 --- a/src/AppMeta.php +++ b/src/AppMeta.php @@ -33,8 +33,8 @@ public function __construct($name, $context = 'app', $appDir = null) if (! file_exists($this->logDir) && mkdir($this->logDir) && ! is_writable($this->logDir)) { throw new NotWritableException($this->logDir); } - $isDevelop = strpos($context, 'prod') === false; - if ($isDevelop) { + $isCacheable = is_int(strpos($context, 'prod-')) || is_int(strpos($context, 'stage-')); + if (! $isCacheable) { $this->clearTmpDirectory($this->tmpDir); } }