mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 13:25:00 +00:00
Fail gracefully when invalid markers are stored (#230)
This commit is contained in:
parent
e73d3f0ff8
commit
8d992dca3f
1 changed files with 4 additions and 2 deletions
|
@ -151,8 +151,10 @@ impl InterpreterQueryResult {
|
|||
let key = if let Some(cache) = cache {
|
||||
if let Ok(key) = cache_key(executable) {
|
||||
if let Ok(data) = cacache::read_sync(cache, &key) {
|
||||
debug!("Using cached markers for {}", executable.display());
|
||||
return Ok(serde_json::from_slice::<Self>(&data)?);
|
||||
if let Ok(info) = serde_json::from_slice::<Self>(&data) {
|
||||
debug!("Using cached markers for {}", executable.display());
|
||||
return Ok(info);
|
||||
}
|
||||
}
|
||||
Some(key)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue