Browse Source

Fix VolumeServer/query CLI

dsehnal 3 years ago
parent
commit
57223a0f9a
3 changed files with 6 additions and 4 deletions
  1. 2 0
      CHANGELOG.md
  2. 3 3
      src/servers/volume/config.ts
  3. 1 1
      src/servers/volume/query.ts

+ 2 - 0
CHANGELOG.md

@@ -6,6 +6,8 @@ Note that since we don't clearly distinguish between a public and private interf
 
 ## [Unreleased]
 
+- Fix VolumeServer/query CLI
+
 ## [v3.0.0] - 2022-01-23
 
 - Assembly handling tweaks:

+ 3 - 3
src/servers/volume/config.ts

@@ -197,13 +197,13 @@ export function configureLocal() {
         description: VOLUME_SERVER_HEADER
     });
     parser.add_argument('--jobs', { help: `Path to a JSON file with job specification.`, required: false });
-    parser.add_argument('--jobsTemplate', { help: 'Print example template for jobs.json and exit.', required: false, nargs: 0 });
+    parser.add_argument('--jobsTemplate', { help: 'Print example template for jobs.json and exit.', required: false, action: 'store_true' });
     addJsonConfigArgs(parser);
     addLimitsArgs(parser);
 
     const config = parser.parse_args() as LimitsConfig & ServerJsonConfig;
 
-    if (config.cfgTemplate !== null) {
+    if (config.cfgTemplate) {
         console.log(JSON.stringify(DefaultLimitsConfig, null, 2));
         process.exit(0);
     }
@@ -216,7 +216,7 @@ export function configureLocal() {
             setLimitsConfig(cfg);
         }
 
-        if (config.printCfg !== null) {
+        if (config.printCfg) {
             console.log(JSON.stringify(LimitsConfig, null, 2));
             process.exit(0);
         }

+ 1 - 1
src/servers/volume/query.ts

@@ -14,7 +14,7 @@ import * as LocalApi from './server/local-api';
 
 const config = configureLocal();
 
-if (config.jobsTemplate !== null) {
+if (config.jobsTemplate) {
     const exampleJobs: LocalApi.JobEntry[] = [{
         source: {
             filename: `g:/test/mdb/xray-1tqn.mdb`,