lando / core

Current Lando v3 runtime
https://docs.lando.dev/core/v3
GNU General Public License v3.0
9 stars 22 forks source link

scripts/sql-import.sh unintentionally swallows exit code when a database import fails. #182

Open codebymikey opened 3 months ago

codebymikey commented 3 months ago

https://github.com/lando/core/blob/08ee112af2c781b76f98f80b3fa7f659de503993/scripts/sql-import.sh#L148

has an OR operator which calls lando_red "Import failed." and unintentionally swallows the original exit code failure.

This is made more apparent when importing a database dump affected by the mariadb sandbox breaking change - https://mariadb.org/mariadb-dump-file-compatibility-change/

strzyzewski commented 1 week ago

@codebymikey I think I ran across the same problem and accidentally created a duplicate of your issue: https://github.com/lando/core/issues/217

We ran into this bug when we tried to import a dump which indeed was affected by the sandbox mode command into an older MariaDB version.