Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Show cached post-install instructions, if provided.
  • Loading branch information
jesseleite committed Oct 4, 2022
commit 1bb72253033c58d5b9d99da22e68fd12783c5648
21 changes: 21 additions & 0 deletions src/NewCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
->makeSuperUser()
->notifyIfOldCliVersion()
->showSuccessMessage()
->showPostInstallInstructions()
->askToSpreadJoy();

return 0;
Expand Down Expand Up @@ -621,6 +622,26 @@ protected function showSuccessMessage()
return $this;
}

/**
* Show cached post-install instructions, if provided.
*
* @return $this
*/
protected function showPostInstallInstructions()
{
if (! file_exists($instructionsPath = $this->absolutePath.'/storage/statamic/tmp/cli/post-install-instructions.txt')) {
return $this;
}

$this->output->write(PHP_EOL);

foreach (file($instructionsPath) as $line) {
$this->output->write('<comment>'.trim($line).'</comment>'.PHP_EOL);
}

return $this;
}

/**
* Ask if user wants to star our GitHub repo.
*
Expand Down