Skip to content

Commit

Permalink
Optimized timezone ask (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
sy-records authored Mar 1, 2022
1 parent 6c85b36 commit 4be884a
Showing 1 changed file 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 @@ -131,14 +131,14 @@ function ($value) {
throw new \InvalidArgumentException('You should type a time zone name, like Asia/Shanghai. Or type n to skip.');
}

return $value;
return trim($value);
},
null,
'n'
);

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

0 comments on commit 4be884a

Please sign in to comment.