New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle starter-kit post-install for statamic/cli users in Windows #6830
Merged
jesseleite
merged 17 commits into
3.3
from
fix/starter-kit-post-install-hook-tty-windows
Oct 6, 2022
Merged
Handle starter-kit post-install for statamic/cli users in Windows #6830
jesseleite
merged 17 commits into
3.3
from
fix/starter-kit-post-install-hook-tty-windows
Oct 6, 2022
Conversation
This file contains 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
…Windows post-hook handling.
…hout TTY support.
…ed by `starter-kit:run-post-install`.
…unning post-install.
jesseleite
changed the title
Cache starter-kit post-install instructions for statamic/cli users in Windows
Handle starter-kit post-install for statamic/cli users in Windows
Oct 4, 2022
…r-kit-post-install-hook-tty-windows
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.
The problem
When working on statamic/cli#56 for #6792, we realized that asking the user for input doesn't work within a sub-process in Windows environments. This is due to the lack of TTY support in Windows, and thus is not supported by symfony/process in Windows environments.
To be clear, this only affects:
The solution
The solution we came up with is to cache friendly post-install instructions for statamic/cli to show at the end of the install process...
By having the user manually run the post-install hook, it can be run as a regular process, rather than as a sub-process (via symfony/process), which allows the post-install hook to ask the user for input without issues in Windows.