moderntribe / square1-global-docker

SquareOne Global Docker is a command line application that provides a local development environment for projects based on the SquareOne Framework.
GNU General Public License v2.0
7 stars 1 forks source link

Invalid Return Type #12

Closed rwrobe closed 4 years ago

rwrobe commented 4 years ago

Describe the bug

Running the bash install script in the installation instructions, I get the following:

Downloading so.phar to /usr/local/bin/so, enter your password when requested.
PHP Fatal error:  Uncaught TypeError: Return value of Tribe\SquareOne\Models\OperatingSystem::getLinuxFlavor() must be of the type string, bool returned in phar:///home/wardrobe/.config/squareone/bin/so/src/Models/OperatingSystem.php:48
Stack trace:
#0 phar:///home/wardrobe/.config/squareone/bin/so/src/Hooks/CertificateHandler.php(51): Tribe\SquareOne\Models\OperatingSystem->getLinuxFlavor()
#1 [internal function]: Tribe\SquareOne\Hooks\CertificateHandler->setDependencies()
#2 phar:///home/wardrobe/.config/squareone/bin/so/vendor/league/container/src/Inflector/Inflector.php(100): call_user_func_array()
#3 phar:///home/wardrobe/.config/squareone/bin/so/vendor/league/container/src/Inflector/InflectorAggregate.php(43): League\Container\Inflector\Inflector->inflect()
#4 phar:///home/wardrobe/.config/squareone/bin/so/vendor/league/container/src/Container.php(290): League\Container\Inflector\InflectorAggregate->inflect()
#5 phar:///home/wardrobe/.config/squareone/bin/so/vendor/league/container/src/Container.php(85): League\Container in phar:///home/wardrobe/.config/squareone/bin/so/src/Models/OperatingSystem.php on line 48

Clearly this is due to my wacky distro, Zorin, but changing the type of the return when the distro isn't found will also prevent this error. See referenced PR.

To Reproduce Ran install line in ZorinOS

Expected behavior Installation succeeds

System Configuration:

rwrobe commented 4 years ago

PR #13

defunctl commented 4 years ago

Fixed in https://github.com/moderntribe/square1-global-docker/pull/30