Skip to contents

Returns TRUE if a local environment appears to exist for the uv project containing the given path.

Usage

has_venv(path = ".")

Arguments

path

Directory to start searching from. Defaults to the current working directory.

Value

TRUE if a local environment directory exists, FALSE otherwise.

Details

This function checks for the presence of a .venv directory at the project root. It does not verify that the environment is complete or usable.

Examples

if (FALSE) has_venv() # \dontrun{}