pub fn read_optional_lockfile(path: &Path) -> Result<Option<Lockfile>>Expand description
Read a lockfile that may legitimately not exist.
Ok(None) means “no lockfile here”, which is normal for the global
scope on a machine that has never used --global. Anything else, in
particular a corrupt or too-new file, is an error: reporting it as
“nothing installed” would be a confident wrong answer.