diff --git a/src/Runtime/Runtime.php b/src/Runtime/Runtime.php index 571aebd..f0f30bb 100644 --- a/src/Runtime/Runtime.php +++ b/src/Runtime/Runtime.php @@ -471,6 +471,11 @@ class Runtime */ public function getCurrentUser(): string { + // Windows fallback + if (!function_exists('posix_getpwuid')) { + return getenv('USERNAME') ?: ''; + } + $userData = posix_getpwuid(posix_geteuid()); return $userData['name']; }