php-school / learn-you-php

🏆 Learn You PHP! - An introduction to PHP's core features: i/o, http, arrays, exceptions and so on.
http://www.phpschool.io/
MIT License
319 stars 36 forks source link

Terminal "Can't retrieve terminal details" is not a valid TTY #53

Closed l80 closed 7 years ago

l80 commented 8 years ago
$ sudo learnyouphp
PHP Fatal error:  Uncaught exception 'PhpSchool\CliMenu\Exception\InvalidTerminalException' with message 'Terminal "Can't retrieve terminal details" is not a valid TTY' in /Users/l80/.composer/vendor/php-school/cli-menu/src/CliMenu.php:121
Stack trace:
#0 /Users/l80/.composer/vendor/php-school/cli-menu/src/CliMenu.php(98): PhpSchool\CliMenu\CliMenu->assertTerminalIsValidTTY()
#1 /Users/l80/.composer/vendor/php-school/cli-menu/src/CliMenu.php(317): PhpSchool\CliMenu\CliMenu->configureTerminal()
#2 /Users/l80/.composer/vendor/php-school/php-workshop/src/Command/MenuCommand.php(32): PhpSchool\CliMenu\CliMenu->open()
#3 [internal function]: PhpSchool\PhpWorkshop\Command\MenuCommand->__invoke('/usr/local/bin/...')
#4 /Users/l80/.composer/vendor/php-school/php-workshop/src/CommandRouter.php(169): call_user_func_array(Object(PhpSchool\PhpWorkshop\Command\MenuCommand), Array)
#5 /Users/l80/.composer/vendor/php-school/php-workshop/src/CommandRouter.php(153): PhpSchool\PhpWorkshop\CommandRouter->callCommand in /Users/l80/.composer/vendor/php-school/cli-menu/src/CliMenu.php on line 121
$ sw_vers -productVersion 
10.11.3
l80 commented 8 years ago

Posix was not installed sudo port install php56-posix

AydinHassan commented 8 years ago

@l80 we should probably handle this better, @mikeymike is there something we should do here? Can we require posix ext with Composer?

mikeymike commented 8 years ago

Yeah we should require it... It needs a general cleanup tbh... removing the Windows terminal class and just roll a single terminal class

Obviously we hoped to support Windows separately but I don't think we'll be able to.

AydinHassan commented 7 years ago

This is fixed in #70