Skip to content

Commit

Permalink
handle no optionals
Browse files Browse the repository at this point in the history
  • Loading branch information
BrettMayson committed Oct 31, 2024
1 parent 5addfd5 commit 20fc58e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bin/src/commands/localization/sort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ pub fn sort(matches: &ArgMatches) -> Result<Report, Error> {
let only_lang = matches.get_flag("only-lang");

for root in ["addons", "optionals"] {
if !ctx.project_folder().join(root).exists() {
continue;
}
let paths: Vec<PathBuf> = walkdir::WalkDir::new(ctx.project_folder().join(root))
.into_iter()
.filter_map(|p| {
Expand Down
3 changes: 3 additions & 0 deletions bin/src/modules/stringtables/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ impl Module for Stringtables {

let mut stringtables = Vec::new();
for root in ["addons", "optionals"] {
if !ctx.workspace_path().join(root)?.exists()? {
continue;
}
let paths = ctx
.workspace_path()
.join(root)
Expand Down

0 comments on commit 20fc58e

Please sign in to comment.