Merge pull request #9771 from keymanapp/fix/developer/9766-kmc-analyze-crash

fix(developer): kmc crash on start
This commit is contained in:
Marc Durdin 2023-10-17 10:14:51 +11:00 committed by GitHub
commit 4981b1ea68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,13 +21,13 @@ interface AnalysisActivityOptions /* not inheriting from CompilerBaseOptions */
};
export function declareAnalyze(program: Command) {
let command = program.command('analyze [infile...]');
let command = program.command('analyze');
declareOskCharUse(command);
declareOskRewrite(command);
}
function declareOskCharUse(command: Command) {
let subCommand = command.command('osk-char-use');
let subCommand = command.command('osk-char-use [infile...]');
BaseOptions.addLogLevel(subCommand);
subCommand
.description('Analyze On Screen Keyboards for character usage')
@ -52,7 +52,7 @@ function declareOskCharUse(command: Command) {
}
function declareOskRewrite(command: Command) {
let subCommand = command.command('osk-rewrite-from-char-use');
let subCommand = command.command('osk-rewrite-from-char-use [infile...]');
subCommand
.description('Rewrite On Screen Keyboard files from source mapping; given file.ext, output is written to file-pua.ext')
.addOption(new Option('-m, --mapping-file <filename>', 'JSON mapping file to read from').makeOptionMandatory())