diff --git a/src/cli/mod.rs b/src/cli/mod.rs index 9a80c9d..cb7daee 100644 --- a/src/cli/mod.rs +++ b/src/cli/mod.rs @@ -84,6 +84,7 @@ impl Cli { // This will also exit early and not run anything else if self.list { let sorted_relative = find_lune_scripts(false).await.map(sort_lune_scripts); + let sorted_home_dir = find_lune_scripts(true).await.map(sort_lune_scripts); if sorted_relative.is_err() && sorted_home_dir.is_err() { eprintln!("{}", sorted_relative.unwrap_err()); diff --git a/src/cli/utils/files.rs b/src/cli/utils/files.rs index 3bbf4a0..9b9b1ca 100644 --- a/src/cli/utils/files.rs +++ b/src/cli/utils/files.rs @@ -151,6 +151,7 @@ pub fn discover_script_path_including_lune_dirs(path: &str) -> Result { .or_else(|_| discover_script_path(format!(".lune{MAIN_SEPARATOR}{path}"), false)) .or_else(|_| discover_script_path(format!("lune{MAIN_SEPARATOR}{path}"), true)) .or_else(|_| discover_script_path(format!(".lune{MAIN_SEPARATOR}{path}"), true)); + match res { // NOTE: The first error message is generally more // descriptive than the ones for the lune subfolders diff --git a/src/cli/utils/listing.rs b/src/cli/utils/listing.rs index 63fd3a0..84d7e13 100644 --- a/src/cli/utils/listing.rs +++ b/src/cli/utils/listing.rs @@ -1,3 +1,5 @@ +#![allow(clippy::match_same_arms)] + use std::{cmp::Ordering, ffi::OsStr, fmt::Write as _, path::PathBuf}; use anyhow::{bail, Result}; @@ -6,7 +8,7 @@ use directories::UserDirs; use once_cell::sync::Lazy; use tokio::{fs, io}; -use super::files::parse_lune_description_from_file; +use super::files::{discover_script_path, parse_lune_description_from_file}; pub static COLOR_BLUE: Lazy