Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: pre-stop throws error if project not running (#2)
* fix: pre-stop throws error if project not running When the mutagen project was not running, but there was a .lando.mutagen.yml.tmp present, the plugin would throw an error. The .tmp file had to be manually deleted to get the project working again. This fixes the issue by first checking if the project is running with the 'mutagen project list' command. Also, the plugin no longer throws an error if the .tmp file is not found, but it now prints a verbose line. * refactor: move isRunning check to its own method * refactor: add softFail option to removeManipulatedMutagenConfigFile If the removeManipulatedMutagenConfigFile throws an error on pre-stop, the process quits, which prevents Lando from continuing. By setting softFail to true, only a verbose line is printed, which allows the Lando process to continue regardless. * fix: isRunning called as property instead of function * fix: remove type declaration from softFail @typescript-eslint/no-inferrable-types * refactor: make caller of removeManipulatedMutagenConfigFile handle exceptions * chore: Removed unused softfail parameter from removeManipulatedConfigFile function * chore: Removed unused parameter from removeManipulatedMutagenConfigFile call Co-authored-by: Francois van der Ven <francoisvdven@gmail.com>
- Loading branch information