add basic FreeBSD support for utils

This commit is contained in:
crazywhalecc
2023-10-15 13:07:13 +08:00
committed by Jerry Ma
parent a983667b90
commit 84d1c789bd
11 changed files with 422 additions and 2 deletions

View File

@@ -163,7 +163,7 @@ class FileSystem
self::emitSourceExtractHook($name);
return;
}
if (PHP_OS_FAMILY === 'Darwin' || PHP_OS_FAMILY === 'Linux') {
if (in_array(PHP_OS_FAMILY, ['Darwin', 'Linux', 'BSD'])) {
if (f_mkdir(directory: $target, recursive: true) !== true) {
throw new FileSystemException('create ' . $name . 'source dir failed');
}