We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8ee308 commit 719bde8Copy full SHA for 719bde8
src/SPC/util/SPCTarget.php
@@ -86,16 +86,13 @@ public static function getLibcVersion(): ?string
86
*/
87
public static function getTargetOS(): string
88
{
89
- $target = getenv('SPC_TARGET');
90
- if ($target === false) {
91
- return PHP_OS_FAMILY;
92
- }
+ $target = (string) getenv('SPC_TARGET');
93
return match (true) {
94
str_contains($target, '-linux') => 'Linux',
95
str_contains($target, '-macos') => 'Darwin',
96
str_contains($target, '-windows') => 'Windows',
97
str_contains($target, '-native') => PHP_OS_FAMILY,
98
- default => throw new WrongUsageException('Cannot parse target.'),
+ default => PHP_OS_FAMILY,
99
};
100
}
101
0 commit comments