mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
Change variable name for placeholder
This commit is contained in:
parent
0d0c789d8b
commit
45f257ef14
@ -321,18 +321,18 @@ abstract class LibraryBase
|
||||
if (!file_exists($placeholder_file)) {
|
||||
return;
|
||||
}
|
||||
$placeholder = json_decode(file_get_contents($placeholder_file), true);
|
||||
if (!is_array($placeholder)) {
|
||||
$placeholders = json_decode(file_get_contents($placeholder_file), true);
|
||||
if (!is_array($placeholders)) {
|
||||
throw new RuntimeException('Invalid placeholder file: ' . $placeholder_file);
|
||||
}
|
||||
$placeholder = get_pack_placehoder();
|
||||
$placeholder_mark = get_pack_placehoder();
|
||||
// replace placeholders in BUILD_ROOT_PATH
|
||||
foreach ($placeholder as $item) {
|
||||
foreach ($placeholders as $item) {
|
||||
$filepath = BUILD_ROOT_PATH . "/{$item}";
|
||||
FileSystem::replaceFileStr(
|
||||
$filepath,
|
||||
array_values($placeholder),
|
||||
array_keys($placeholder),
|
||||
array_values($placeholder_mark),
|
||||
array_keys($placeholder_mark),
|
||||
);
|
||||
}
|
||||
// remove placeholder file
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user