Command line export of ODB++ silently fails.
Description
Exporting ODB++ from the command line with an --output file silently fails because the code path checks for an existing file and exits if the file already exists. When exporting from the ODB++ export dialog, the user is given an opportunity to delete file which the command line does not. The expectation is that the ODB++ export behave like the other CLI commands and overwrite the output file.
Steps to reproduce
- Run the
kicad-cli pcb export odb --output=project.odb ./project.kicad_pcbwhereprojectis the name of a valid project. - Copy the ODB++ file to a different name.
- Run KiCad and modify the
project.kicad_pcbfile. - Save the changes to the board file and close KiCad.
- Repeat step 1.
- Open
project.odband the copied ODB++ file in step 2 in a binary diff tool. - Observe the files are identical indicating that
project.odbhas not been updated. - Close the binary diff tool.
- Delete the
project.odbfile. - Repeat step 1.
- Repeat step 6 and observe the files are now different.
KiCad Version
Application: KiCad x86_64 on x86_64
Version: 9.0.7-250-gc1e9e95849, debug build
Libraries:
wxWidgets 3.2.8
FreeType 2.13.3
HarfBuzz 10.2.0
FontConfig 2.15.0
libcurl/8.14.1 OpenSSL/3.5.3 zlib/1.3.1 brotli/1.1.0 zstd/1.5.7 libidn2/2.3.8 libpsl/0.21.2 libssh2/1.11.1 nghttp2/1.64.0 librtmp/2.3 OpenLDAP/2.6.10
Platform: Ubuntu 25.10, 64 bit, Little endian, wxGTK, X11, ubuntu, wayland
Build Info:
Date: Feb 18 2026 07:58:59
wxWidgets: 3.2.8 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.88.0
OCC: 7.8.1
Curl: 8.14.1
ngspice: 44.2
Compiler: GCC 15.2.0 with C++ ABI 1020
Build settings:
KICAD_IPC_API=ON
KICAD_STDLIB_DEBUG=OFF
KICAD_STDLIB_LIGHT_DEBUG=OFF
KICAD_SANITIZE_ADDRESS=OFF
KICAD_SANITIZE_THREADS=OFF
Locale:
Lang: en_US
Enc: UTF-8
Num: 1,234.5
Encoded кΩ丈: D0BACEA9E4B888 (sys), D0BACEA9E4B888 (utf8)