mirror of
https://github.com/lsd-rs/lsd
synced 2024-12-14 14:12:31 +00:00
Fix the tests and avoid a regression
This commit is contained in:
parent
80ab697fb9
commit
f344f42bfe
1 changed files with 2 additions and 1 deletions
|
@ -74,7 +74,8 @@ impl Flags {
|
|||
};
|
||||
|
||||
let recursive = matches.is_present("recursive");
|
||||
let recursion_depth = match matches.value_of("depth") {
|
||||
let recursion_input = matches.values_of("depth").and_then(|values| values.last());
|
||||
let recursion_depth = match recursion_input {
|
||||
Some(str) if recursive || layout == Layout::Tree => match str.parse::<usize>() {
|
||||
Ok(val) => val,
|
||||
Err(_) => {
|
||||
|
|
Loading…
Reference in a new issue