Skip to content
This repository has been archived by the owner on Mar 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #58 from ecosia/mp-arguments-array
Browse files Browse the repository at this point in the history
Change arguments to list to accommodate for arguments without values.
  • Loading branch information
ash2k committed Apr 30, 2019
2 parents 31382b2 + f3e8b20 commit 20cbdb1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
8 changes: 5 additions & 3 deletions multirun/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ load("@com_github_atlassian_bazel_tools//:multirun/def.bzl", "multirun", "comman
command(
name = "command1",
command = "//some/label",
arguments = {
"-arg1": "value1",
},
arguments = [
"-arg1",
"value1",
"-arg2",
],
environment = {
"ABC": "DEF",
},
Expand Down
8 changes: 4 additions & 4 deletions multirun/def.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ def _command_impl(ctx):
for k, v in ctx.attr.raw_environment.items()
]
str_args = [
"%s=%s" % (k, shell.quote(v))
for k, v in ctx.attr.arguments.items()
"%s" % shell.quote(v)
for v in ctx.attr.arguments
]
command_elements = ["exec env"] + \
str_env + \
Expand All @@ -130,8 +130,8 @@ def _command_impl(ctx):
_command = rule(
implementation = _command_impl,
attrs = {
"arguments": attr.string_dict(
doc = "Dictionary of command line arguments",
"arguments": attr.string_list(
doc = "List of command line arguments",
),
"environment": attr.string_dict(
doc = "Dictionary of environment variables",
Expand Down

0 comments on commit 20cbdb1

Please sign in to comment.