mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-25 10:18:59 +02:00
refactor(rules): change default rule from baseline to fallback behavior
The default rule should runs only when no non-default pre rule matches, instead of running first as a baseline. This follows the old behavior as before the pr is established.: - Default rules act as fallback handlers that execute only when no matching non-default rule exists in the pre phase - IfElseBlockCommand now returns early when a condition matches with a nil Do block, instead of falling through to else blocks - Add nil check for auth handler to allow requests when no auth is configured - Fix unterminated environment variable parsing to preserve input Updates tests to verify the new fallback behavior where special rules suppress default rule execution.
This commit is contained in:
@@ -77,6 +77,9 @@ func expandEnvVarsRaw(v string) (string, gperr.Error) {
|
||||
|
||||
var err gperr.Error
|
||||
if inEnvVar {
|
||||
// Write back the unterminated ${...} so the output matches the input.
|
||||
buf.WriteString("${")
|
||||
buf.WriteString(envVar.String())
|
||||
err = ErrUnterminatedEnvVar
|
||||
}
|
||||
if len(missingEnvVars) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user