Repository navigation
Prompt for Statamic license key before installing - #117
Merged
Merged
Conversation
When enabling Pro, ask for the license key up front alongside the other questions instead of having `pro:enable` prompt for it after installation. The key is written to `.env` once the site exists, and `pro:enable` now always runs with `--no-interaction` so it doesn't ask again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Laravel Prompts' `task()` leaves its newline tracking stale, so the callout rendered with no gap after the install step. Write a blank line before it until that's fixed upstream. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request moves the Statamic license key prompt to the start, alongside the other questions, instead of after installation.
Since statamic/cms#14686 (v6.27.0),
pro:enableasks for a license key. That meant someone who chose Pro got asked again for input after the install had finished. Now, when Pro is enabled in interactive mode (by answering the question or by passing--pro), the CLI asks for the key up front. Leaving it blank is allowed. Once the site is installed, the key is written to.env: it replaces an existing (or commented-out)STATAMIC_LICENSE_KEY=line, or is added at the end.pro:enablenow always runs with--no-interactionso it doesn't ask again. No new flag was added.This also adds a blank line before the success callout. Laravel Prompts'
task()prints its completion line from a forked child process, so the parent process loses track of the trailing newlines. The callout then rendered right up against the✔ Installing Statamicline when Pro wasn't enabled.