mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 12:54:52 +08:00
Add ext-shmop, fix path slashes
This commit is contained in:
parent
6ed620683f
commit
271013f2d6
@ -229,6 +229,10 @@ ext-readline:
|
|||||||
build-static: true
|
build-static: true
|
||||||
ext-session:
|
ext-session:
|
||||||
type: php-extension
|
type: php-extension
|
||||||
|
ext-shmop:
|
||||||
|
type: php-extension
|
||||||
|
php-extension:
|
||||||
|
build-with-php: true
|
||||||
ext-sockets:
|
ext-sockets:
|
||||||
type: php-extension
|
type: php-extension
|
||||||
ext-sqlite3:
|
ext-sqlite3:
|
||||||
|
|||||||
@ -23,6 +23,7 @@ class PackageConfig
|
|||||||
if (!is_dir($dir)) {
|
if (!is_dir($dir)) {
|
||||||
throw new WrongUsageException("Directory {$dir} does not exist, cannot load pkg.json config.");
|
throw new WrongUsageException("Directory {$dir} does not exist, cannot load pkg.json config.");
|
||||||
}
|
}
|
||||||
|
$dir = rtrim($dir, '/');
|
||||||
$loaded = [];
|
$loaded = [];
|
||||||
$files = FileSystem::scanDirFiles($dir, false);
|
$files = FileSystem::scanDirFiles($dir, false);
|
||||||
if (is_array($files)) {
|
if (is_array($files)) {
|
||||||
|
|||||||
@ -481,7 +481,7 @@ class FileSystem
|
|||||||
public static function fullpath(string $path, string $relative_path_base): string
|
public static function fullpath(string $path, string $relative_path_base): string
|
||||||
{
|
{
|
||||||
if (FileSystem::isRelativePath($path)) {
|
if (FileSystem::isRelativePath($path)) {
|
||||||
$path = $relative_path_base . DIRECTORY_SEPARATOR . $path;
|
$path = rtrim($relative_path_base, '/') . DIRECTORY_SEPARATOR . $path;
|
||||||
}
|
}
|
||||||
if (!file_exists($path)) {
|
if (!file_exists($path)) {
|
||||||
throw new FileSystemException("Path does not exist: {$path}");
|
throw new FileSystemException("Path does not exist: {$path}");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user