pantheon-systems / terminus

The Pantheon CLI — a standalone utility for performing operations on the Pantheon Platform
https://pantheon.io
Other
313 stars 190 forks source link

self:console broken after running self:update #2335

Open RichardDavies opened 2 years ago

RichardDavies commented 2 years ago

terminus self:console doesn't work after running terminus self:update. Lando installs Terminus 2.5.0 by default and terminus self:console works as expected with that version. However, after updating Terminus to 3.0.5 via terminus self:update then terminus self:console returns the following error:

PHP Fatal error: Uncaught Error: Call to undefined function Psy\sh() in phar:///usr/local/bin/terminus/src/Commands/Self/ConsoleCommand.php:37

Platform

Lando v3.6.0 running on Windows 10 WSL2

Installed Via

Lando Pantheon Recipe

PHP Version

(x) 7.4x (x) 8.0 ( ) 8.1

Command Executed

lando terminus self:update lando terminus self:console

Expected behavior

Open an interactive PHP console within Terminus/

Actual behavior

$ lando terminus self:console -vvv                                                                                          [02/11/22 10:07AM]
lando 10:07:42 DEBUG ==> No update available. 
lando 10:07:42 VERBOSE ==> starting bootstrap at level engine... 
lando 10:07:42 VERBOSE ==> config bootstrap beginning... 
lando 10:07:42 DEBUG ==> emitting event pre-bootstrap-config 
lando 10:07:42 DEBUG ==> plugin lando-core loaded from /snapshot/cli/plugins/lando-core/index.js 
lando 10:07:42 DEBUG ==> plugin lando-events loaded from /snapshot/cli/plugins/lando-events/index.js 
lando 10:07:42 DEBUG ==> plugin lando-networking loaded from /snapshot/cli/plugins/lando-networking/index.js 
lando 10:07:42 DEBUG ==> plugin lando-proxy loaded from /snapshot/cli/plugins/lando-proxy/index.js 
lando 10:07:42 DEBUG ==> plugin lando-recipes loaded from /snapshot/cli/plugins/lando-recipes/index.js 
lando 10:07:42 DEBUG ==> plugin lando-services loaded from /snapshot/cli/plugins/lando-services/index.js 
lando 10:07:42 DEBUG ==> plugin lando-sharing loaded from /snapshot/cli/plugins/lando-sharing/index.js 
lando 10:07:42 DEBUG ==> plugin lando-test loaded from /snapshot/cli/plugins/lando-test/index.js 
lando 10:07:42 DEBUG ==> plugin lando-tooling loaded from /snapshot/cli/plugins/lando-tooling/index.js 
lando 10:07:42 DEBUG ==> plugin @lando/acquia loaded from /snapshot/cli/node_modules/@lando/acquia/index.js 
lando 10:07:42 DEBUG ==> plugin @lando/lagoon loaded from /snapshot/cli/node_modules/@lando/lagoon/index.js 
lando 10:07:43 DEBUG ==> plugin @lando/pantheon loaded from /snapshot/cli/node_modules/@lando/pantheon/index.js 
lando 10:07:43 DEBUG ==> plugin @lando/platformsh loaded from /snapshot/cli/node_modules/@lando/platformsh/index.js 
lando 10:07:43 DEBUG ==> emitting event post-bootstrap-config 
lando 10:07:43 VERBOSE ==> building proxy config... 
lando 10:07:43 VERBOSE ==> config bootstrap completed. 
lando 10:07:43 VERBOSE ==> tasks bootstrap beginning... 
lando 10:07:43 DEBUG ==> emitting event pre-bootstrap-tasks 
lando 10:07:43 DEBUG ==> autoloaded task config 
lando 10:07:43 DEBUG ==> autoloaded task destroy 
lando 10:07:43 DEBUG ==> autoloaded task info 
lando 10:07:43 DEBUG ==> autoloaded task list 
lando 10:07:43 DEBUG ==> autoloaded task logs 
lando 10:07:43 DEBUG ==> autoloaded task poweroff 
lando 10:07:43 DEBUG ==> autoloaded task rebuild 
lando 10:07:43 DEBUG ==> autoloaded task restart 
lando 10:07:43 DEBUG ==> autoloaded task share 
lando 10:07:43 DEBUG ==> autoloaded task start 
lando 10:07:43 DEBUG ==> autoloaded task stop 
lando 10:07:43 DEBUG ==> autoloaded task version 
lando 10:07:43 DEBUG ==> autoloaded task init 
lando 10:07:43 DEBUG ==> autoloaded task ssh 
lando 10:07:43 DEBUG ==> emitting event post-bootstrap-tasks 
lando 10:07:43 VERBOSE ==> tasks bootstrap completed. 
lando 10:07:43 VERBOSE ==> engine bootstrap beginning... 
lando 10:07:43 DEBUG ==> emitting event pre-bootstrap-engine 
lando 10:07:43 DEBUG ==> automoved scripts from /snapshot/cli/plugins/lando-core/scripts to /home/csrichardd/.lando/scripts and set to mode 755 
lando 10:07:43 DEBUG ==> automoved scripts from /snapshot/cli/plugins/lando-proxy/scripts to /home/csrichardd/.lando/scripts and set to mode 755 
lando 10:07:43 DEBUG ==> automoved scripts from /snapshot/cli/plugins/lando-recipes/scripts to /home/csrichardd/.lando/scripts and set to mode 755 
lando 10:07:43 DEBUG ==> automoved scripts from /snapshot/cli/plugins/lando-services/scripts to /home/csrichardd/.lando/scripts and set to mode 755 
lando 10:07:43 DEBUG ==> automoved scripts from /snapshot/cli/plugins/lando-sharing/scripts to /home/csrichardd/.lando/scripts and set to mode 755 
lando 10:07:43 DEBUG ==> automoved scripts from /snapshot/cli/node_modules/@lando/acquia/scripts to /home/csrichardd/.lando/scripts and set to mode 755 
lando 10:07:43 DEBUG ==> automoved scripts from /snapshot/cli/node_modules/@lando/lagoon/scripts to /home/csrichardd/.lando/scripts and set to mode 755 
lando 10:07:43 DEBUG ==> automoved scripts from /snapshot/cli/node_modules/@lando/pantheon/scripts to /home/csrichardd/.lando/scripts and set to mode 755 
lando 10:07:43 DEBUG ==> automoved scripts from /snapshot/cli/node_modules/@lando/platformsh/scripts to /home/csrichardd/.lando/scripts and set to mode 755 
lando 10:07:43 DEBUG ==> emitting event post-bootstrap-engine 
lando 10:07:43 VERBOSE ==> engine bootstrap completed. 
lando 10:07:43 VERBOSE ==> bootstrap completed. 
lando 10:07:43 DEBUG ==> emitting event post-bootstrap 
lando 10:07:43 VERBOSE ==> docker-engine exists: true 
lando 10:07:43 VERBOSE ==> docker-compose exists: true 
lando 10:07:43 DEBUG ==> emitting event cli-answers 
lando 10:07:43 DEBUG ==> emitting event cli-terminus-answers 
lando 10:07:43 DEBUG ==> emitting event cli-run 
lando 10:07:43 DEBUG ==> emitting event cli-terminus-run 
lando 10:07:43 DEBUG ==> emitting event pre-command-runner 
lando 10:07:43 DEBUG ==> emitting event pre-terminus 
lando 10:07:43 DEBUG ==> process pid4 running /usr/bin/docker exec portlandor_appserver_1 terminus self:console cstdio=[inherit, pipe, pipe], silent=false, mode=attach, detached=false
lando 10:07:44 DEBUG ==> engine is up. 
lando 10:07:44 DEBUG ==> docker is running. 
lando 10:07:44 VERBOSE ==> checking docker version compatibility... 
lando 10:07:44 DEBUG ==> compatibility results name=compose, link=https://docs.docker.com/compose/install/#install-compose-on-linux-systems, wants=1.23.0 - 1.30.0, version=1.29.2, semversion=1.29.2, semmin=1.23.0, semmax=1.30.0, dockerVersion=true, satisfied=true, name=engine, link=https://docs.docker.com/engine/install/, wants=18.09.3 - 20.10.99, version=20.10.8, semversion=20.10.8, semmin=18.9.3, semmax=20.10.99, dockerVersion=true, satisfied=true
PHP Fatal error:  Uncaught Error: Call to undefined function Psy\sh() in phar:///usr/local/bin/terminus/src/Commands/Self/ConsoleCommand.php:37
Stack trace:
#0 [internal function]: Pantheon\Terminus\Commands\Self\ConsoleCommand->console('portlandor.dev', Array)
#1 phar:///usr/local/bin/terminus/vendor/consolidation/annotated-command/src/CommandProcessor.php(257): call_user_func_array(Array, Array)
#2 phar:///usr/local/bin/terminus/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
#3 phar:///usr/local/bin/terminus/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#4 phar:///usr/local/bin/terminus/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(350): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Sym in phar:///usr/local/bin/terminus/src/Commands/Self/ConsoleCommand.php on line 37

Fatal error: Uncaught Error: Call to undefined function Psy\sh() in phar:///usr/local/bin/terminus/src/Commands/Self/ConsoleCommand.php:37
Stack trace:
#0 [internal function]: Pantheon\Terminus\Commands\Self\ConsoleCommand->console('portlandor.dev', Array)
#1 phar:///usr/local/bin/terminus/vendor/consolidation/annotated-command/src/CommandProcessor.php(257): call_user_func_array(Array, Array)
#2 phar:///usr/local/bin/terminus/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
#3 phar:///usr/local/bin/terminus/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#4 phar:///usr/local/bin/terminus/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(350): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Sym in phar:///usr/local/bin/terminus/src/Commands/Self/ConsoleCommand.php on line 37
lando 10:07:45 DEBUG ==> process pid4 finished with exit code 255 
kporras07 commented 2 years ago

Hi @RichardDavies

We fixed this a couple of days ago but a new version of terminus has not yet been tagged.

In the meantime, if installing from source is an option for you, that could work. We will tag a new version soon