Fix env path for windows

This commit is contained in:
René Preuß
2021-07-24 13:00:33 +02:00
parent 917af5c140
commit 26672908f1
4 changed files with 20 additions and 3 deletions

14
app/helpers.php Normal file
View File

@@ -0,0 +1,14 @@
<?php
if (!function_exists('bunny_cli_path')) {
function bunny_cli_path(): string
{
if (strncasecmp(PHP_OS, 'WIN', 3) === 0) {
$result = exec("echo %appdata%");
} else {
$result = getenv('HOME');
}
return $result . DIRECTORY_SEPARATOR . '.bunny-cli';
}
}