Skip to content
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

Don't enable tty if no-interaction option is true #66

Merged
merged 4 commits into from
Oct 24, 2024

Conversation

amiuhle
Copy link
Contributor

@amiuhle amiuhle commented Nov 16, 2023

Fixes #65

@amiuhle
Copy link
Contributor Author

amiuhle commented Nov 16, 2023

I found a way to simulate #65 without a docker container:

Give a debug.sh like below, it's possible to simulate this behaviour with true | (setsid ./debug.sh) 2>&1 | cat

# debug.sh
# https://superuser.com/questions/1430872/how-to-simulate-a-shell-without-tty
# true | (setsid ./debug.sh) 2>&1 | cat
bin/statamic new -n -f -- test01

This fails on master with the error message described above, my PR should fix it.

I also fixed an error caused by --no-ansi being prepended to rm commands, so I added a filter. I could create a helper function to DRY up the code a bit, if you want me to open a separate PR for this, please let me know.

@amiuhle amiuhle marked this pull request as ready for review December 4, 2023 11:30
@jasonvarga
Copy link
Member

Sorry for the delay. Why did you add those rm lines? What is that solving? As far as I can tell we never use the rm command.

@jasonvarga jasonvarga merged commit 6b03e28 into statamic:master Oct 24, 2024
1 check passed
@amiuhle
Copy link
Contributor Author

amiuhle commented Nov 7, 2024

Sorry, it's been a while and I don't remember exactly what it was used for, but I think the rm command is used somewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

statamic new requires tty to run
2 participants