File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed
Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -84,9 +84,12 @@ public function handle()
8484
8585 $ this ->line ('Writing new environment configuration to file. ' );
8686 foreach ($ variables as $ key => $ value ) {
87- $ regex = '/^ ' . $ key . '=(.*)$/m ' ;
88- $ replace = $ key . '= ' . $ value ;
89- $ envContents = preg_replace ($ regex , $ replace , $ envContents );
87+ $ newValue = $ key . '= ' . $ value ;
88+ if (preg_match_all ('/^ ' . $ key . '=(.*)$/m ' , $ envContents ) < 1 ) {
89+ $ envContents = $ envContents . "\n" . $ newValue ;
90+ } else {
91+ $ envContents = preg_replace ('/^ ' . $ key . '=(.*)$/m ' , $ newValue , $ envContents );
92+ }
9093 $ bar ->advance ();
9194 }
9295
Original file line number Diff line number Diff line change 7474 " sed -i.bak 's/homestead.app/pterodactyl.local/g' Homestead.yaml" ,
7575 " rm Homestead.yaml.bak" ,
7676 " php artisan key:generate" ,
77- " php artisan pterodactyl:env"
77+ " php artisan pterodactyl:env" ,
78+ " php artisan migrate" ,
79+ " php artisan pterodactyl:user"
7880 ],
7981 "setup" : [
8082 " composer install --ansi --no-dev" ,
8183 " php -r \" copy('.env.example', '.env');\" " ,
8284 " php artisan key:generate" ,
83- " php artisan pterodactyl:env"
85+ " php artisan pterodactyl:env" ,
86+ " php artisan migrate" ,
87+ " php artisan pterodactyl:user"
8488 ]
8589 },
8690 "config" : {
You can’t perform that action at this time.
0 commit comments