Skip to content

Commit

Permalink
Stricter validation of defs flags
Browse files Browse the repository at this point in the history
  • Loading branch information
jart committed Jun 8, 2016
1 parent 20543dc commit 57db937
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions closure/compiler/closure_js_binary.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ def _impl(ctx):
files += [report]
outputs += [report]
args += ["--property_renaming_report=%s" % report.path]

# validate defs
for flag in ctx.attr.defs:
if not flag.startswith("--") or (" " in flag and "=" not in flag):
fail("Please use --flag=value syntax for defs")
args += ctx.attr.defs

# add gigantic list of files
Expand Down

0 comments on commit 57db937

Please sign in to comment.