Skip to content

Commit

Permalink
fix(idwt tighten-apply): now exits script when field/value is not app…
Browse files Browse the repository at this point in the history
…roved
  • Loading branch information
noahdotpy committed Jul 24, 2024
1 parent 8c55b8c commit dc7c6c6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions files/system/common/usr/libexec/idwt/tighten-apply.nu
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,16 @@ let approved_appends = $tightener_config | get approved-appends
if $action == "append" {
if not (regex_matches_with_any $approved_appends $field) {
echo $"ERROR: ($field) is not in approved tightener append fields"
exit 1
}
} else if $action == "update" {
if not (regex_matches_with_any ($approved_updates | columns) $field) {
echo $"ERROR: ($field) is not in approved tightener update fields"
exit 1
}
if not (regex_matches_with_any ($approved_updates | values) $value) {
echo $"ERROR: ($value) is not in approved tightener update values"
exit 1
}
} else {
echo "ERROR: unsupported tightener action"
Expand Down

0 comments on commit dc7c6c6

Please sign in to comment.