Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: pre-stop throws error if project not running #2

Merged
merged 8 commits into from
Feb 23, 2022
Merged

fix: pre-stop throws error if project not running #2

merged 8 commits into from
Feb 23, 2022

Conversation

timvango
Copy link
Contributor

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.

src/Mutagen.ts Outdated Show resolved Hide resolved
@francoisvdv
Copy link
Owner

Hi Tim,

Thanks for the PR, could you take a look at the feedback?

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.
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.
@typescript-eslint/no-inferrable-types
@timvango
Copy link
Contributor Author

Hi @francoisvdv ,
I've made some changes with the feedback you provided

@francoisvdv francoisvdv merged commit c2a214f into francoisvdv:main Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants