Skip to content

Commit e0252b3

Browse files
author
Xavier HAUSHERR
committed
Fix cacheDir creation on Fresh Install #6
1 parent 85bddb3 commit e0252b3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

CacheWarmer/ThriftCompileCacheWarmer.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Overblog\ThriftBundle\CacheWarmer;
44

5+
use Symfony\Component\Filesystem\Filesystem;
56
use Symfony\Component\ClassLoader\ClassMapGenerator;
67

78
use Overblog\ThriftBundle\Compiler\ThriftCompiler;
@@ -88,6 +89,14 @@ public function compile()
8889
}
8990
}
9091

92+
// Check if thrift cache directory exists
93+
$fs = new Filesystem();
94+
95+
if(!$fs->exists($cacheDir))
96+
{
97+
$fs->mkdir($cacheDir);
98+
}
99+
91100
// Generate ClassMap
92101
ClassMapGenerator::dump($cacheDir, sprintf('%s/classes.map', $cacheDir));
93102
}

0 commit comments

Comments
 (0)