zend-patterns / ZendServerSDK

Pure ZF2 CLI for zpk creation and webapi client.
BSD 3-Clause "New" or "Revised" License
22 stars 17 forks source link

zs-client.phar addTarget yields exception with message saying user should add a target. #53

Closed clarkphp closed 9 years ago

clarkphp commented 9 years ago
$ /vagrant/zs-client.phar addTarget --target=testServer --zsurl="http://localhost:10081" --zskey=admin --zssecret=obfuscated --zsversion="7.0"

PHP Fatal error:  Uncaught exception 'Zend\Console\Exception\RuntimeException' with message 'Make sure that you have set your target first. \n
                                                                This can be done with phar:///vagrant/zs-client.phar/module/Client/Module.php addTarget --target=<UniqueName> --zsurl=http://localhost:10081/ZendServer --zskey= --zssecret=' in phar:///vagrant/zs-client.phar/module/Client/Module.php:10
Stack trace:
#0 [internal function]: Client\Module->postRoute(Object(Zend\Mvc\MvcEvent))
#1 phar:///vagrant/zs-client.phar/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php(2): call_user_func(Array, Object(
Zend\Mvc\MvcEvent))
#2 phar:///vagrant/zs-client.phar/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php(2): Zend\EventManager\EventManage
r->triggerListeners('route', Object(Zend\Mvc\MvcEvent), Object(Closure))
#3 phar:///vagrant/zs-client.phar/vendor/zendframework/zend-mvc/Zend/Mvc/Application.php(2): Zend\EventManager\EventManager->trigger('r in ph
ar:///vagrant/zs-client.phar/module/Client/Module.php on line 10

Fatal error: Uncaught exception 'Zend\Console\Exception\RuntimeException' with message 'Make sure that you have set your target first. \n
                                                                This can be done with phar:///vagrant/zs-client.phar/module/Client/Module.php addTarget --target=<UniqueName> --zsurl=http://localhost:10081/ZendServer --zskey= --zssecret=' in phar:///vagrant/zs-client.phar/module/Client/Module.php:10
Stack trace:
#0 [internal function]: Client\Module->postRoute(Object(Zend\Mvc\MvcEvent))
#1 phar:///vagrant/zs-client.phar/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php(2): call_user_func(Array, Object(
Zend\Mvc\MvcEvent))
#2 phar:///vagrant/zs-client.phar/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php(2): Zend\EventManager\EventManage
r->triggerListeners('route', Object(Zend\Mvc\MvcEvent), Object(Closure))
#3 phar:///vagrant/zs-client.phar/vendor/zendframework/zend-mvc/Zend/Mvc/Application.php(2): Zend\EventManager\EventManager->trigger('r in ph
ar:///vagrant/zs-client.phar/module/Client/Module.php on line 10

Steps to reproduce.

  1. Fresh install of Zend Server 7.0 on a new vagrant box chef/ubuntu-14.04
  2. Bootstrapped Zend Server with Developer launch profile
  3. Download zs-client.phar from zend-patterns/ZendServerSDK
  4. Ran zs-client.phar addTarget command noted above.