Skip to content

Commit

Permalink
feat(version): New version command
Browse files Browse the repository at this point in the history
Show only startup info, then exit
  • Loading branch information
Göran Sander committed Dec 17, 2023
1 parent 443bf3f commit aa02c0e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/ctrl-q.js
Expand Up @@ -814,6 +814,18 @@ const program = new Command();
.option('--auth-root-cert-file <file>', 'Qlik Sense root certificate file (exported from QMC)', './cert/root.pem')
.option('--auth-jwt <jwt>', 'JSON Web Token (JWT) to use for authentication with Qlik Sense server');

// Show version command
program
.command('version')
.description('show version info')
.addOption(
new Option('--log-level <level>', 'log level').choices(['error', 'warn', 'info', 'verbose', 'debug', 'silly']).default('info')
)
.action(async (options) => {
logger.verbose(`Version: ${appVersion}`);
})
;

// Parse command line params
await program.parseAsync(process.argv);
})();

0 comments on commit aa02c0e

Please sign in to comment.