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

[zend-progressbar] fix "stty: 'standard input': Inappropriate ioctl for device" spam #155

Merged

Conversation

falkenhawk
Copy link
Member

@falkenhawk falkenhawk commented Dec 5, 2022

using zend-progressbar with Console adapter spams stty: 'standard input': Inappropriate ioctl for device on non-interactive shell (e.g. tests on CI)

Never fixed in original zf v2 / laminas:
zendframework/zend-progressbar#23
laminas/laminas-progressbar#2

image

@falkenhawk falkenhawk force-pushed the fix-stty-standard-input-inappropriate-ioctl-for-device branch from 4ac34de to 6e5b413 Compare December 5, 2022 08:52
@falkenhawk falkenhawk marked this pull request as ready for review December 5, 2022 09:17
Copy link
Contributor

@partikus partikus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An interesting approach with redirecting stderr to /dev/null. 👍

@falkenhawk falkenhawk marked this pull request as draft December 5, 2022 09:37
@falkenhawk falkenhawk marked this pull request as ready for review December 5, 2022 10:30
@falkenhawk
Copy link
Member Author

@marcinlee suggested that [[ $- == *i* ]] && stty size could be used instead - to avoid calling stty at all when shell is not interactive. Might be cleaner than to discarding stderr. 🤔

@partikus
Copy link
Contributor

partikus commented Dec 5, 2022

@falkenhawk both are fine, IMHO discarding stderr is easier to understand though the condition looks like a more appropriate approach

@falkenhawk falkenhawk force-pushed the fix-stty-standard-input-inappropriate-ioctl-for-device branch from 6e5b413 to 7733ea7 Compare December 5, 2022 12:15
@falkenhawk falkenhawk changed the base branch from php81-compat to master December 5, 2022 12:19
@falkenhawk falkenhawk changed the title fix "stty: 'standard input': Inappropriate ioctl for device" spam [zend-progressbar] fix "stty: 'standard input': Inappropriate ioctl for device" spam Dec 5, 2022
@falkenhawk falkenhawk merged commit 7924878 into master Dec 5, 2022
@falkenhawk falkenhawk deleted the fix-stty-standard-input-inappropriate-ioctl-for-device branch December 5, 2022 12:43
@falkenhawk falkenhawk mentioned this pull request Dec 12, 2022
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.

2 participants