Fix env path for windows

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

No files matched your search

+14
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';
}
}