Function rg::args::current_dir

source ·
fn current_dir() -> Result<PathBuf, Box<dyn Error>>
Expand description

Attempts to discover the current working directory. This mostly just defers to the standard library, however, such things will fail if ripgrep is in a directory that no longer exists. We attempt some fallback mechanisms, such as querying the PWD environment variable, but otherwise return an error.