Switch to using CustomError because a boxed StdError is not Send.
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
use crate::cli::parameters::InitArgs;
|
||||
use crate::config::Config;
|
||||
use crate::error::CustomError;
|
||||
|
||||
pub(crate) async fn init_writer_folder(args: InitArgs) -> Result<(), Box<dyn std::error::Error>> {
|
||||
pub(crate) async fn init_writer_folder(args: InitArgs) -> Result<(), CustomError> {
|
||||
if args.path.exists() && !args.path.is_dir() {
|
||||
return Err("The supplied path exists but is not a directory. Aborting.".into());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user