Use Git Bash with Policy Checks

Without proper configuration, the Git Bash shell on Windows does not display the correct prompts to configure Policy Checks. This guide covers how to work around this limitation so you can customize Policy Checks and use Git Bash. The instructions allow Git Bash to work like the native Windows command prompt or Linux terminal.

By default, Liquibase always runs with access to the console for input and output. You can run Policy Checks commands in Git Bash or any other terminal. You can disable user access to the console with the --headless global argument. By default, --headless is set to false.

Configure the Git Bash TERM_PROGRAM environment variable

If Policy Checks prompts do not appear in Git Bash as expected, configure the Git Bash TERM_PROGRAM environment variable in the Git Bash terminal:

Example: TERM_PROGRAM=mintty

To see what TERM_PROGRAM is set to, run the env command to list all environment variables including TERM_PROGRAM.

If TERM_PROGRAM is not set to MINTTY, you can run export TERM_PROGRAM=MINTTY. This export resets the value to MINTTY for the active Git Bash terminal. To set TERM_PROGRAM permanently on startup, review your OS documentation on editing configuration files, for example .bashrc or .bash_profile.