Skip to content

Commit

Permalink
Fixed installHyperfScript does not work. (#36)
Browse files Browse the repository at this point in the history
* fix install script

修复安装脚本时区输入n时date_default_timezone_set报错问题

* Update OptionalPackages.php

* Optimized code.

Co-authored-by: 李铭昕 <[email protected]>
  • Loading branch information
xiaoguo0426 and limingxinleo authored Mar 20, 2020
1 parent fe8d497 commit 4fb5626
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions installer/OptionalPackages.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ public function installHyperfScript()
$ask[] = "Make your selection or type a time zone name, like Asia/Shanghai (n):\n";
$answer = $this->io->ask(implode('', $ask), 'n');

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

0 comments on commit 4fb5626

Please sign in to comment.