Function get_venv_path

Source
pub fn get_venv_path(
    runtime_path: PathBuf,
    uv_path: String,
    python_native_path: String,
    quiet: bool,
    clean: bool,
    files_to_clean: &mut Vec<PathBuf>,
) -> PathBuf
Expand description

Finds a virtual environment path.

§Errors

The function returns an Err if the provided venv path does not exist or if the Python executable under the venv path does not exist.

§Platform-specific

On Unix-like systems, it uses which command.

On Windows, it uses where command.

§Arguments

  • runtime_path: The runtime path of the current directory.
  • uv_path: The path of the uv executable.
  • python_native_path: The path of the native Python executable.
  • quiet: If true, suppresses warnings and errors.
  • clean: If true, will clean the created uv-managed .venv and config files after execution.
  • files_to_clean: A vector of paths to clean.

§Returns

The path of the found virtual environment.