Skip to content

Commit

Permalink
use default languge if not specified in cli arguments - post doc:gen …
Browse files Browse the repository at this point in the history
…fixes
  • Loading branch information
RealRichi3 committed May 13, 2024
1 parent eb811f7 commit 8e515e3
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/fixes/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import CONFIG from "../config";
import { fixDuplicateLanguageReferences } from "./fix_duplicate_language_refs";
import { fixLocalizedIndexFiles } from "./fix_localized_index_file";
import { fixWrongLanguageReferences } from "./fix_wrong_language_refs";
Expand All @@ -9,15 +10,17 @@ async function start() {
?.split(",");

if (!langs) {
console.log(
"Please provide languages to create localized docs for using the languages flag",
console.warn(
"Languages not specified in cli arguments, setting languages to default",
);
process.exit(1);
}

await fixLocalizedIndexFiles(langs)
await fixDuplicateLanguageReferences(langs)
await fixWrongLanguageReferences(langs)
CONFIG.languages = langs ?? CONFIG.languages;

await fixLocalizedIndexFiles();
await fixDuplicateLanguageReferences();
await fixWrongLanguageReferences();
}

start()
start();

0 comments on commit 8e515e3

Please sign in to comment.