Skip to content

Commit a44001e

Browse files
committed
fix: Pass proxy information to uv (acts-project#5178)
If using uv, run it in a clean environment but include the variables that specify a proxy.
1 parent cc43698 commit a44001e

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

cmake/ActsCodegen.cmake

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,25 @@ function(acts_code_generation)
200200
file(MAKE_DIRECTORY ${_output_dir})
201201

202202
if(NOT ACTS_USE_SYSTEM_LIBS)
203+
# If using uv, run it in a clean environment but include the variables
204+
# that specify a proxy.
205+
set(_uv_environment UV_NO_CACHE=1)
206+
set(_propagate
207+
HTTP_PROXY
208+
HTTPS_PROXY
209+
ALL_PROXY
210+
NO_PROXY
211+
SSL_CERT_FILE
212+
)
213+
foreach(_var IN LISTS _propagate)
214+
if(DEFINED ENV{${_var}})
215+
list(APPEND _uv_environment "${_var}=$ENV{${_var}}")
216+
endif()
217+
endforeach()
203218
add_custom_command(
204219
OUTPUT ${_output_file}
205220
COMMAND
206-
env -i UV_NO_CACHE=1 ${uv_exe} run --quiet --python
221+
env -i ${_uv_environment} ${uv_exe} run --quiet --python
207222
${ARGS_PYTHON_VERSION} --no-project ${_arg_isolated}
208223
${_with_args} ${ARGS_PYTHON} ${_output_file}
209224
DEPENDS ${_depends}

0 commit comments

Comments
 (0)