Skip to content

Commit

Permalink
Fix 'protoc' work directory deletion in go_proto_library.bzl (bazel-c…
Browse files Browse the repository at this point in the history
…ontrib#263)

go_proto_library.bzl creates a work dir and copy all the protos. It
removes it in each invocation but the 'rm' shell command does not
include the -r option.
  • Loading branch information
joseferminj authored and pmbethe09 committed Feb 6, 2017
1 parent bfa3601 commit adfad77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion proto/go_proto_library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def _go_proto_library_gen_impl(ctx):
# Create work dir, copy all protos there stripping of any external/bazel- prefixes.
work_dir = ctx.outputs.outs[0].path + ".protoc"
root_prefix = "/".join([".." for _ in work_dir.split("/")])
cmds = ["set -e", "/bin/rm -f %s; /bin/mkdir -p %s" % (work_dir, work_dir)]
cmds = ["set -e", "/bin/rm -rf %s; /bin/mkdir -p %s" % (work_dir, work_dir)]
srcs = list(ctx.files.srcs)
dirs = set([s.short_path[:-1-len(s.basename)]
for s in srcs + protos])
Expand Down

0 comments on commit adfad77

Please sign in to comment.