I can't seem to use Expect in a portfile. Using the following minimal portfile:
PortSystem 1.0 name foo version 1 fetch { system "expect -c 'spawn echo hello; interact;'" } And running: sudo port fetch I get this unexpected output: The system has no more ptys. Ask your system administrator to create more. The system, of course, has ptys available, and running the expect command outside of MacPorts works. Expect seems to be experiencing some problem, and erroneously claims that the problem is no more ptys. How can I get Expect to tell me what the real problem is? I've tried using Expect's "-d" flag to print more information, but it doesn't illuminate the situation for me. I used to use Expect successfully in a portfile, but it was years ago and much has changed in MacPorts base since then.