Skip to content

Commit

Permalink
fixup! Add protoc wrapper on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
avdv committed Aug 22, 2023
1 parent 1c73460 commit fa79a8e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/protoc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ def _protoc_wrapper_impl(ctx):
content = """\
import os, subprocess, sys
os.environ["PATH"] += os.pathsep + os.path.realpath(os.path.dirname({compiler_exe}))
path = os.environ.get("PATH", "")
path = os.pathsep.join([path, os.path.realpath(os.path.dirname({compiler_exe}))])
os.environ["PATH"] = path
subprocess.check_call([{protoc}] + sys.argv[1:])
""".format(protoc = repr(ctx.executable._protoc.path), compiler_exe = repr(compiler)),
is_executable = True,
Expand Down

0 comments on commit fa79a8e

Please sign in to comment.