Skip to content

Commit

Permalink
#44 Temporary directory location (#45)
Browse files Browse the repository at this point in the history
* Add support for custom temporary directory via 'TMPDIR' environment variable

* Add support for custom temporary directory via 'TMPDIR' environment variable
  • Loading branch information
cheplv authored and umpirsky committed Jul 27, 2016
1 parent 0023f32 commit a0c6b46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions twig-gettext-extractor
Expand Up @@ -22,8 +22,8 @@ if (file_exists($a = __DIR__.'/../../autoload.php')) {
require_once __DIR__.'/vendor/autoload.php';
}

$twig = new Twig_Environment(new Twig\Gettext\Loader\Filesystem('/'), array(
'cache' => '/tmp/cache/'.uniqid(),
$twig = new Twig_Environment(new Twig\Gettext\Loader\Filesystem(DIRECTORY_SEPARATOR), array(
'cache' => implode(DIRECTORY_SEPARATOR, array(sys_get_temp_dir(), 'cache', uniqid()) ),
'auto_reload' => true
));
$twig->addExtension(new Twig_Extensions_Extension_I18n());
Expand Down

0 comments on commit a0c6b46

Please sign in to comment.