Fix config validation to recreate config on failure
- Change load_or_create_config to call create_interactive_config when validate_config fails - This ensures inconsistent configs are replaced with valid ones
This commit is contained in:
4
setup.sh
4
setup.sh
@@ -272,8 +272,8 @@ load_or_create_config() {
|
|||||||
if load_config; then
|
if load_config; then
|
||||||
log_info "Configuration loaded from ${CONFIG_FILE}"
|
log_info "Configuration loaded from ${CONFIG_FILE}"
|
||||||
if ! validate_config; then
|
if ! validate_config; then
|
||||||
log_error "Configuration validation failed"
|
log_warning "Configuration validation failed - creating new configuration"
|
||||||
exit 1
|
create_interactive_config
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
log_info "Creating new configuration..."
|
log_info "Creating new configuration..."
|
||||||
|
|||||||
Reference in New Issue
Block a user