don't
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: panic if current directory is unreadable

Signed-off-by: tjh <did:plc:65gha4t3avpfpzmvpbwovss7>

+2 -8
+2 -8
crates/knot/src/cli.rs
··· 1 1 use clap::Parser; 2 2 use core::fmt; 3 3 use identity::{Did, ResolveError, Resolver}; 4 - use std::{path::PathBuf, str::FromStr}; 4 + use std::{env, path::PathBuf, str::FromStr}; 5 5 6 6 #[derive(Debug, Parser)] 7 7 #[command(about, author, version)] ··· 54 54 } 55 55 56 56 fn default_repository_base() -> PathBuf { 57 - match std::env::current_dir() { 58 - Ok(path) => path, 59 - Err(error) => { 60 - tracing::error!(?error, "failed to read current working directory"); 61 - PathBuf::from(".") 62 - } 63 - } 57 + env::current_dir().expect("current working directory should be readable") 64 58 } 65 59 66 60 pub fn parse() -> Arguments {