bail

The .bail command controls how rsql handles errors during command execution. By default, rsql continues processing after an error, which is useful for running scripts or multiple commands in a session. Enabling bail mode (on) will cause rsql to immediately exit on the first error, which is helpful for automation, CI/CD, or when you want to ensure no further actions are taken after a failure.

Usage

.bail <on|off>

When to use

  • Enable bail (on) when running scripts where any error should halt execution.
  • Disable bail (off) for interactive sessions or when you want to review multiple errors in one run.

Examples

Show the current bail setting:

.bail

Enable bail on first error (recommended for automation):

.bail on

Disable bail on first error (recommended for exploration):

.bail off

Troubleshooting

  • If your script stops unexpectedly, check if .bail on is set.
  • If errors are being ignored, ensure .bail off is not set unintentionally.

Demonstration