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

Wrong exit code when lando db-import fails #217

Closed
strzyzewski opened this issue Oct 7, 2024 · 2 comments
Closed

Wrong exit code when lando db-import fails #217

strzyzewski opened this issue Oct 7, 2024 · 2 comments

Comments

@strzyzewski
Copy link

The command lando db-import yields an exit code 0 even when an import error occured.
You can reproduce this by trying to import a corrupted SQL dump and checking afterwards with echo $?.

I suppose this has to do with the last line in the /helpers/sql-import.sh script:

# Import
lando_pink "Importing $FILE..."
eval "$CMD" && lando_green "Import complete!" || lando_red "Import failed."

Instead of lando_red the function lando_error should be called.

@rtfm-47 rtfm-47 transferred this issue from lando/lando Oct 7, 2024
@AaronFeledy AaronFeledy transferred this issue from lando/legacy-cli Oct 8, 2024
@strzyzewski
Copy link
Author

After scanning through other issues I found a very similar to mine:
#182

I think I accidentally created a duplicate so you can keep the triage effort very short.

@reynoldsalec
Copy link
Member

Awesome thanks for noticing the duplicate @strzyzewski!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants