apolopena / gitpod-laravel-starter

Configurable LAMP or LEMP stack starter project powered by Laravel and Gitpod. Supports Laravel 6, 7, and 8. Out of the box support for React, Vue, and Bootstrap frontends, with or without built-in auth .
https://github.com/apolopena/gitpod-laravel-starter/wiki
MIT License
40 stars 44 forks source link

If an example preset script fails some portions of that example are still installed #209

Open apolopena opened 2 years ago

apolopena commented 2 years ago

Describe the bug

Version conflicts checks for example presets happen right before the script that installs the example is ran but after framework for that example is installed, this results in a potion of the example being installed but not the whole thing.

Screenshots

Steps to reproduce

  1. setstarter.ini` to laravel version 9.*
  2. Set starter.ini to PHP version 8.0
  3. Run the workspace with #EXAMPLE=10 to activate the vue example preset

The Vue example will not be installed however the Vue framework will be installed and some portions of starter.ini will be bypassed as if the Vue example preset was fully installed. See the summary ine the terminal output for more details.

Expected behavior

If an example preset is not installed and then nothing in starter.ini should be bypassed. At least make this less likley to happen.

Additional information

This can be refactored in init-optional-scaffolding.sh by making the version checks before or during the directive are changes (see the big case statement in that file) rather than at the end right before the install script for that example is sourced/executed.