message: format: allow envoy bazel prefix to be overriden in BUILD fixer
diff: @@ -67,10 +67,12 @@ def RunBuildozer(cmds, contents):
  # Add an Apache 2 license and envoy_package() import and rule as needed.
  def FixPackageAndLicense(contents):
  - # Ensure we have an envoy_package import load if this is a real Envoy package.
  + # Ensure we have an envoy_package import load if this is a real Envoy package. We also allow
  + # the prefix to be overridden if envoy is included in a larger workspace.
  if re.search(ENVOY_RULE_REGEX, contents):
  contents = RunBuildozer([
  - ('new_load //bazel:envoy_build_system.bzl envoy_package', '__pkg__'),
  + ('new_load {}//bazel:envoy_build_system.bzl envoy_package'.format(
  + os.getenv("ENVOY_BAZEL_PREFIX", "")), '__pkg__'),
  ], contents)
  # Envoy package is inserted after the load block containing the
  # envoy_package import.
  