fix(rust): do not fail if nodes directory is not found
@@ -44,6 +44,7 @@ fn run_impl(opts: CommandGlobalOpts, cmd: DeleteCommand) -> crate::Result<()> {
// Try to delete dangling embedded nodes directories
let dirs = OckamConfig::directories();
let nodes_dir = dirs.data_local_dir();
+ if nodes_dir.exists() {
for entry in nodes_dir.read_dir()? {
let dir = entry?;
if !dir.file_type()?.is_dir() {
@@ -55,6 +56,7 @@ fn run_impl(opts: CommandGlobalOpts, cmd: DeleteCommand) -> crate::Result<()> {
}
}
}
+ }
// If force is enabled
if cmd.force {
