Skip to content

Commit

Permalink
Don't use shorthands in bazel integration
Browse files Browse the repository at this point in the history
Shorthands are convenient when calling the tool interactively,
but in the context of scripted invocations it's better to be a
bit more verbose and explicit.

Signed-off-by: Andrea Bolognani <[email protected]>
  • Loading branch information
andreabolognani committed Feb 21, 2023
1 parent befa445 commit 8728a7d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion internal/bazeldnf.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def _bazeldnf_impl(ctx):
if ctx.attr.rpmtree:
args += ["--rpmtree", ctx.attr.rpmtree]
if ctx.file.tar:
args += ["-i", ctx.file.tar.path]
args += ["--input", ctx.file.tar.path]
transitive_dependencies += [ctx.attr.tar.files]
for lib in ctx.attr.libs:
args += [lib]
Expand Down
6 changes: 3 additions & 3 deletions internal/rpmtree.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
def _rpm2tar_impl(ctx):
rpms = []
for rpm in ctx.files.rpms:
rpms += ["-i", rpm.path]
rpms += ["--input", rpm.path]

out = ctx.outputs.out
args = ["rpm2tar", "-o", out.path]
args = ["rpm2tar", "--output", out.path]

if ctx.attr.symlinks:
symlinks = []
Expand Down Expand Up @@ -56,7 +56,7 @@ def _tar2files_impl(ctx):
for out in ctx.outputs.out:
files += [out.path]

args = ["tar2files", "--file-prefix", ctx.attr.prefix, "-i", ctx.files.tar[0].path] + files
args = ["tar2files", "--file-prefix", ctx.attr.prefix, "--input", ctx.files.tar[0].path] + files
ctx.actions.run(
inputs = ctx.files.tar,
outputs = ctx.outputs.out,
Expand Down
2 changes: 1 addition & 1 deletion internal/xattrs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

def _xattrs_impl(ctx):
out = ctx.outputs.out
args = ["xattr", "-i", ctx.files.tar[0].path, "-o", out.path]
args = ["xattr", "--input", ctx.files.tar[0].path, "--output", out.path]

if ctx.attr.capabilities:
capabilities = []
Expand Down

0 comments on commit 8728a7d

Please sign in to comment.