bach check or bach build stops, the message names what’s wrong. This page explains the common ones.
Run bach check after each fix; it’s faster than building.
”bach.toml isn’t valid”
The line after it says why:app.executable. Fix that setting. See Missing files for this one.
”unknown field”
”TOML parse error”
'C:\Tools\app'.
”files.source holds …, an environment file with credentials”
A file that looks like a secret is in your build folder. If it shouldn’t ship, add it tofiles.exclude, or better, keep it out of the build folder. If it must ship, name it in files.allow_secrets. See Choose files.
”… is a symbolic link”
Windows builds only package real files. Copy the files instead of linking them.”… would replace the uninstaller Bach adds”
Your build folder has a file calleduninstall.exe at the top. Rename it, or exclude it.
”couldn’t replace … (is it open?)”
The setup file from an earlier build is running, or something holds it. Close it and build again.The setup program can’t be downloaded
On macOS and Linux, or with abach installed without bach-setup.exe next to it, the first build downloads it from GitHub. If that fails (no network, a proxy, or BACH_NO_DOWNLOAD):
- Download the Windows zip for the same version from the releases page.
- Pass the file:
bach build --runtime path/to/bach-setup.exe, or setBACH_RUNTIME.
bach doctor shows which one is used.
Warnings fail my CI build
With--strict or BACH_STRICT=1, any warning stops the build. Fix the warnings that bach check prints, or remove --strict.
—sign fails
- “
--signwas given, but bach.toml has no [signing] section”: add[signing]. - signtool says no certificates were found: your certificate isn’t where signtool looks. See Signing.
- “signing.arguments for signtool must start with the word sign”: add
signat the start.
”installed Macs would refuse it as an update”
Your Mac certificate doesn’t match[updates] signer, so people who already have your app couldn’t update to this file. Set [macos.signing] identity to that publisher’s Developer ID Application certificate and build with --sign, or change [updates] signer. See Protect your updates.
Check that it’s fixed
bach check ends without errors and prints what would be installed.