From f07cda404165f3fed06a4cbc42325873591d7856 Mon Sep 17 00:00:00 2001 From: chua Date: Mon, 12 Aug 2024 12:10:02 +0000 Subject: [PATCH] add HOME variable for test --- uv/private/pip.bzl | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/uv/private/pip.bzl b/uv/private/pip.bzl index 8a446e6..c078f42 100644 --- a/uv/private/pip.bzl +++ b/uv/private/pip.bzl @@ -93,10 +93,17 @@ def _pip_compile_test_impl(ctx): generator_label = ctx.attr.generator_label.label, uv_args = ctx.attr.uv_args, ) - return DefaultInfo( - executable = executable, - runfiles = _runfiles(ctx), - ) + return [ + DefaultInfo( + executable = executable, + runfiles = _runfiles(ctx), + ), + RunEnvironmentInfo( + # Ensures that .netrc can be detected by uv + # See https://github.com/theoremlp/rules_uv/issues/103 + inherited_environment = ["HOME"], + ), + ] _pip_compile_test = rule( attrs = _COMMON_ATTRS | {