Package org.openrewrite.python.internal
Class UvExecutor
java.lang.Object
org.openrewrite.python.internal.UvExecutor
Shared utility for finding and executing the uv Python package manager.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable StringFind the uv executable on the system.static UvExecutor.RunResultRun a uv command in the given directory with additional environment variables.
-
Constructor Details
-
UvExecutor
public UvExecutor()
-
-
Method Details
-
run
public static UvExecutor.RunResult run(Path workDir, String uvPath, Map<String, String> environment, String... args) throws IOException, InterruptedExceptionRun a uv command in the given directory with additional environment variables.- Parameters:
workDir- the working directoryuvPath- the path to the uv executableenvironment- additional environment variables (e.g., SSL_CERT_FILE, HTTP_PROXY)args- the arguments to pass to uv- Returns:
- the run result
- Throws:
IOExceptionInterruptedException
-
findUvExecutable
Find the uv executable on the system.- Returns:
- the absolute path to uv, or null if not found
-