      "get_include_directory",
      "get_plugin_args",
      "get_proto_root",
-@@ -117,34 +117,17 @@ def generate_cc_impl(ctx):
+@@ -118,34 +118,18 @@ def generate_cc_impl(ctx):
      arguments += ["--proto_path={0}{1}".format(dir_out, proto_root)]
      arguments += [_get_srcs_file_path(proto) for proto in protos]
  

     attrs = {
         "srcs": attr.label_list(
             mandatory = True,
@@ -160,13 +143,12 @@ _generate_cc = rule(
             mandatory = False,
             allow_empty = True,
         ),

-        executable = ctx.executable._protoc,
+        executable = ctx.executable.protoc,
         arguments = arguments,
+        use_default_shell_env = True,
     )
 
     return struct(files = depset(out_files))
