mirror of
https://github.com/lune-org/lune.git
synced 2024-12-12 13:00:37 +00:00
Fix list subcommand not listing global dir without a local dir
This commit is contained in:
parent
fbee7c85bd
commit
2e53cdcad7
2 changed files with 10 additions and 14 deletions
|
@ -61,6 +61,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
### Fixed
|
||||
|
||||
- Fixed list subcommand not listing global scripts without a local `.lune` / `lune` directory present
|
||||
- Fixed `net.serve` stopping when the returned `ServeHandle` is garbage collected
|
||||
- Fixed missing trailing newline when using the `warn` global
|
||||
- Fixed constructor for `CFrame` in the `roblox` built-in library not parsing the 12-arg overload correctly. ([#102])
|
||||
|
|
|
@ -83,20 +83,15 @@ impl Cli {
|
|||
// List files in `lune` and `.lune` directories, if wanted
|
||||
// This will also exit early and not run anything else
|
||||
if self.list {
|
||||
let sorted_relative = match find_lune_scripts(false).await {
|
||||
Ok(scripts) => sort_lune_scripts(scripts),
|
||||
Err(e) => {
|
||||
eprintln!("{e}");
|
||||
return Ok(ExitCode::FAILURE);
|
||||
}
|
||||
};
|
||||
let sorted_home_dir = match find_lune_scripts(true).await {
|
||||
Ok(scripts) => sort_lune_scripts(scripts),
|
||||
Err(e) => {
|
||||
eprintln!("{e}");
|
||||
return Ok(ExitCode::FAILURE);
|
||||
}
|
||||
};
|
||||
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());
|
||||
return Ok(ExitCode::FAILURE);
|
||||
}
|
||||
|
||||
let sorted_relative = sorted_relative.unwrap_or(Vec::new());
|
||||
let sorted_home_dir = sorted_home_dir.unwrap_or(Vec::new());
|
||||
|
||||
let mut buffer = String::new();
|
||||
if !sorted_relative.is_empty() {
|
||||
|
|
Loading…
Reference in a new issue