mirror of
https://github.com/bitinflow/bunny-cli.git
synced 2026-03-13 13:45:54 +00:00
Fix env path for windows
This commit is contained in:
14
app/helpers.php
Normal file
14
app/helpers.php
Normal 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';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user