How do you pass user input to PECL in a Homebrew install?
سؤال
I'm writing a custom homebrew formula for installing PHP. It works great except for when I need to install APC (and some others) via PECL. The PECL installation pauses to ask a few questions and causes the brew install to fail or hang due to the lack of user input.
Is there a way to simply accept the defaults in PECL? Or can Homebrew somehow send the Enter key to the system?
المحلول
Found a user input hack here that worked for me:
system "printf \"no\nno\nno\nno\nyes\nno\n\" | #{prefix}/bin/pecl install -afl apc"
system "printf \"autodetect\n\" | #{prefix}/bin/pecl install -afl libevent-beta"
لا تنتمي إلى StackOverflow