Skip to content

Commit

Permalink
added Helpers::IsWindows
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Dec 12, 2024
1 parent 8bc39ba commit dcaeb77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Utils/Finder.php
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,6 @@ private function buildPattern(string $mask): string
'\-' => '-',
],
);
return '#' . $anchor . $pattern . '$#D' . (defined('PHP_WINDOWS_VERSION_BUILD') ? 'i' : '');
return '#' . $anchor . $pattern . '$#D' . (Helpers::IsWindows ? 'i' : '');
}
}
3 changes: 3 additions & 0 deletions src/Utils/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

class Helpers
{
public const IsWindows = PHP_OS_FAMILY === 'Windows';


/**
* Executes a callback and returns the captured output as a string.
*/
Expand Down

0 comments on commit dcaeb77

Please sign in to comment.