diff --git a/installer/OptionalPackages.php b/installer/OptionalPackages.php index 24f984de..834eef50 100644 --- a/installer/OptionalPackages.php +++ b/installer/OptionalPackages.php @@ -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); } diff --git a/installer/resources/bin/hyperf.php b/installer/resources/bin/hyperf.stub similarity index 100% rename from installer/resources/bin/hyperf.php rename to installer/resources/bin/hyperf.stub