From 6bb778112694267706124a740957b1d6e9fa7349 Mon Sep 17 00:00:00 2001 From: Andreas Stenius Date: Wed, 26 Oct 2022 23:03:10 -0400 Subject: [PATCH] Ensure PATH to shims are absolute. --- .../pants/backend/codegen/protobuf/lint/buf/format_rules.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/python/pants/backend/codegen/protobuf/lint/buf/format_rules.py b/src/python/pants/backend/codegen/protobuf/lint/buf/format_rules.py index 7dcde7b2c1a..3857ff0f318 100644 --- a/src/python/pants/backend/codegen/protobuf/lint/buf/format_rules.py +++ b/src/python/pants/backend/codegen/protobuf/lint/buf/format_rules.py @@ -1,5 +1,6 @@ # Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). +import os from dataclasses import dataclass from pants.backend.codegen.protobuf.lint.buf.skip_field import SkipBufFormatField @@ -98,7 +99,7 @@ async def run_buf_format( output_files=request.files, description=f"Run buf format on {pluralize(len(request.files), 'file')}.", level=LogLevel.DEBUG, - env={"PATH": binary_shims.bin_directory}, + env={"PATH": os.path.join("{chroot}", binary_shims.bin_directory)}, ), ) return await FmtResult.create(request, result)