We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f70c2b6 commit f672c63Copy full SHA for f672c63
crates/plugins/src/store.rs
@@ -1,4 +1,4 @@
1
-use anyhow::{anyhow, Result};
+use anyhow::{anyhow, Context, Result};
2
use flate2::read::GzDecoder;
3
use std::{
4
ffi::OsStr,
@@ -85,8 +85,15 @@ impl PluginStore {
85
// |- bar.json
86
let catalogue_dir =
87
crate::lookup::spin_plugins_repo_manifest_dir(self.get_plugins_directory());
88
+
89
+ // Catalogue directory doesn't exist so likely nothing has been installed.
90
+ if !catalogue_dir.exists() {
91
+ return Ok(Vec::new());
92
+ }
93
94
let plugin_dirs = catalogue_dir
- .read_dir()?
95
+ .read_dir()
96
+ .context("reading manifest catalogue at {catalogue_dir:?}")?
97
.filter_map(|d| d.ok())
98
.map(|d| d.path())
99
.filter(|p| p.is_dir());
0 commit comments