Skip to content

Commit 4fb5626

Browse files
Fixed installHyperfScript does not work. (#36)
* fix install script 修复安装脚本时区输入n时date_default_timezone_set报错问题 * Update OptionalPackages.php * Optimized code. Co-authored-by: 李铭昕 <[email protected]>
1 parent fe8d497 commit 4fb5626

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

installer/OptionalPackages.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ public function installHyperfScript()
127127
$ask[] = "Make your selection or type a time zone name, like Asia/Shanghai (n):\n";
128128
$answer = $this->io->ask(implode('', $ask), 'n');
129129

130-
if (! empty($answer) || $answer != 'n') {
131-
$content = file_get_contents($this->installerSource . '/resources/bin/hyperf.php');
130+
$content = file_get_contents($this->installerSource . '/resources/bin/hyperf.stub');
131+
if ($answer != 'n') {
132132
$content = str_replace('%TIME_ZONE%', $answer, $content);
133133
file_put_contents($this->projectRoot . '/bin/hyperf.php', $content);
134134
}
File renamed without changes.

0 commit comments

Comments
 (0)