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.
-
Constructor Details
-
UvExecutor
public UvExecutor()
-
-
Method Details
-
run
public static UvExecutor.RunResult run(Path workDir, String uvPath, String... args) throws IOException, InterruptedException Run a uv command in the given directory.- Parameters:
workDir- the working directoryuvPath- the path to the uv executableargs- 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
-