Browse Source

add a key to ctx.action dict to prevent protoc losing the default env

Yunlong Liu 8 years ago
parent
commit
ef61a9d313
1 changed files with 2 additions and 1 deletions
  1. 2 1
      protobuf.bzl

+ 2 - 1
protobuf.bzl

@@ -90,6 +90,7 @@ def _proto_gen_impl(ctx):
         arguments=args + import_flags + [s.path for s in srcs],
         arguments=args + import_flags + [s.path for s in srcs],
         executable=ctx.executable.protoc,
         executable=ctx.executable.protoc,
         mnemonic="ProtoCompile",
         mnemonic="ProtoCompile",
+        use_default_shell_env=True,
     )
     )
 
 
   return struct(
   return struct(
@@ -141,7 +142,7 @@ Args:
     compiler.
     compiler.
   plugin_language: the language of the generated sources
   plugin_language: the language of the generated sources
   plugin_options: a list of options to be passed to the plugin
   plugin_options: a list of options to be passed to the plugin
-  gen_cc: generates C++ sources in addition to the ones from the plugin. 
+  gen_cc: generates C++ sources in addition to the ones from the plugin.
   gen_py: generates Python sources in addition to the ones from the plugin.
   gen_py: generates Python sources in addition to the ones from the plugin.
   outs: a list of labels of the expected outputs from the protocol compiler.
   outs: a list of labels of the expected outputs from the protocol compiler.
 """
 """