Skip to content

Commit

Permalink
Correct comparison against stamping policy name
Browse files Browse the repository at this point in the history
The three valid stamping policies are named as follows:
- Allow
- Force
- Prevent

When checking whether to stamp injected values for tagged fields, we
were looking mistakenly for a value of "Never", which was the previous
name for the policy now known as "Prevent". Correct that sentinel
value to allow rule callers to prevent stamping of injected values.
  • Loading branch information
seh committed Nov 12, 2024
1 parent 4e51aee commit cbe3179
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cue/cue.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ CUEInstanceInfo = provider(

def _replacer_if_stamping(stamping_policy):
# NB: We can't access the "_cue_config" attribute here.
return Label("//tools/cmd/replace-stamps") if stamping_policy != "Never" else None
return Label("//tools/cmd/replace-stamps") if stamping_policy != "Prevent" else None

def _add_common_source_consuming_attrs_to(attrs):
attrs.update({
Expand Down

0 comments on commit cbe3179

Please sign in to comment.