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

[5.5] Fix choice for non-tty terminals #20840

Merged
merged 2 commits into from
Aug 30, 2017
Merged

[5.5] Fix choice for non-tty terminals #20840

merged 2 commits into from
Aug 30, 2017

Conversation

SerafimArts
Copy link
Contributor

Some terminals (like "Command Line Tools Console" in PhpStrom) does not support any features and skip waiting the answer of the method choice(). By the default it returns null which leads to error:

~/artisan vendor:publish -vvv


[ErrorException]     
  Undefined offset: 1  
                       

Exception trace:
 () at ~/vendor/laravel/framework/src/Illuminate/Foundation/Console/VendorPublishCommand.php:142
 Illuminate\Foundation\Bootstrap\HandleExceptions->handleError() at ~/vendor/laravel/framework/src/Illuminate/Foundation/Console/VendorPublishCommand.php:142
 Illuminate\Foundation\Console\VendorPublishCommand->parseChoice() at ~/vendor/laravel/framework/src/Illuminate/Foundation/Console/VendorPublishCommand.php:117
 Illuminate\Foundation\Console\VendorPublishCommand->promptForProviderOrTag() at ~/vendor/laravel/framework/src/Illuminate/Foundation/Console/VendorPublishCommand.php:97
 Illuminate\Foundation\Console\VendorPublishCommand->determineWhatShouldBePublished() at ~/vendor/laravel/framework/src/Illuminate/Foundation/Console/VendorPublishCommand.php:72
 Illuminate\Foundation\Console\VendorPublishCommand->handle() at n/a:n/a
 call_user_func_array() at ~/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29
 Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() at ~/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:87
 Illuminate\Container\BoundMethod::callBoundMethod() at ~/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:31
 Illuminate\Container\BoundMethod::call() at ~/vendor/laravel/framework/src/Illuminate/Container/Container.php:549
 Illuminate\Container\Container->call() at ~/vendor/laravel/framework/src/Illuminate/Console/Command.php:180
 Illuminate\Console\Command->execute() at ~/vendor/symfony/console/Command/Command.php:276
 Symfony\Component\Console\Command\Command->run() at ~/vendor/laravel/framework/src/Illuminate/Console/Command.php:167
 Illuminate\Console\Command->run() at ~/vendor/symfony/console/Application.php:934
 Symfony\Component\Console\Application->doRunCommand() at ~/vendor/symfony/console/Application.php:231
 Symfony\Component\Console\Application->doRun() at ~/vendor/symfony/console/Application.php:132
 Symfony\Component\Console\Application->run() at ~/vendor/laravel/framework/src/Illuminate/Console/Application.php:82
 Illuminate\Console\Application->run() at ~/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:125
 Illuminate\Foundation\Console\Kernel->handle() at ~/artisan:37

This pull request fixes this error by selecting the default 0 option.

@SerafimArts SerafimArts changed the title Fix choice for non-tty terminals [5.5] Fix choice for non-tty terminals Aug 30, 2017
@taylorotwell taylorotwell merged commit 6831938 into laravel:5.5 Aug 30, 2017
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