Fix --validate-config exit code (#24398)

Validate config exists 0 regardless of if the config is valid or not.
This makes it not very useful for CI

Tiny fix to bail non-zero if the config is invalid
This commit is contained in:
Nick Davies 2026-09-18 06:52:39 -06:00 committed by GitHub
parent 334073967b
commit 0ca5cbbb63
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -99,6 +99,10 @@ def main() -> None:
print("*** End Config Validation Errors ***")
print("*************************************************************")
# force a non-zero exit code for config failures
if args.validate_config:
sys.exit(1)
# attempt to start Frigate in recovery mode
try:
config = FrigateConfig.load(install=True, safe_load=True)