Commit aefee93
authored
CLI: Show clear error for non-existent WordPress versions (#3065)
* Validate WordPress version against available versions in CLI site create
When a user specifies a non-existent WordPress version via --wp flag,
the command now fails early with a clear error listing available versions
instead of proceeding through all setup steps and failing with a generic
server startup error.
* Validate WordPress version before interactive prompts
Move the version availability check to the top of the handler so it
fails immediately when --wp is passed with a non-existent version,
instead of after the user fills in all interactive prompts.
* Validate and resolve WordPress version in CLI site create
When --wp flag specifies a non-existent version, show a clear error
listing available versions instead of failing with a generic server
error. Short versions like "6.7" are resolved to full versions like
"6.7.2" with a log message showing the resolution.
* Start spinner before version validation to fix silent output
picospinner requires the spinner to be running for fail/succeed to
render output. Start it with a "Checking WordPress version" message
before fetching available versions.1 parent 57328c3 commit aefee93
1 file changed
Lines changed: 49 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
638 | 638 | | |
639 | 639 | | |
640 | 640 | | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
641 | 690 | | |
642 | 691 | | |
643 | 692 | | |
| |||
0 commit comments