mythix-cli 1.3.8 → 1.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/runner.js +16 -5
  2. package/package.json +1 -1
package/bin/runner.js CHANGED
@@ -387,11 +387,22 @@ async function commandRunners(application, commandsObj, context, showHelp) {
387
387
  showHelp(subHelp)
388
388
  };
389
389
 
390
- let rootOptions = { help, showHelp: customShowHelp, helpArgPattern: null };
391
- let mythixPath = Path.dirname(require.resolve('mythix', { paths: [ process.env.PWD, Path.resolve(process.env.PWD, 'node_modules') ] }));
392
- let mythixCLIPAth = Path.resolve(mythixPath, 'cli');
393
- let mythixCLI = require(mythixCLIPAth);
394
- let config = mythixCLI.loadMythixConfig(argOptions.config);
390
+ let rootOptions;
391
+ let mythixPath;
392
+ let mythixCLIPAth;
393
+ let mythixCLI;
394
+ let config;
395
+
396
+ try {
397
+ rootOptions = { help, showHelp: customShowHelp, helpArgPattern: null };
398
+ mythixPath = Path.dirname(require.resolve('mythix', { paths: [ process.env.PWD, Path.resolve(process.env.PWD, 'node_modules') ] }));
399
+ mythixCLIPAth = Path.resolve(mythixPath, 'cli');
400
+ mythixCLI = require(mythixCLIPAth);
401
+ config = mythixCLI.loadMythixConfig(argOptions.config);
402
+ } catch (error) {
403
+ customShowHelp(help);
404
+ process.exit(1);
405
+ }
395
406
 
396
407
  let Application = config.getApplicationClass(config);
397
408
  if (typeof Application !== 'function')
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "mythix-cli": "./bin/mythix-cli.js"
4
4
  },
5
5
  "name": "mythix-cli",
6
- "version": "1.3.8",
6
+ "version": "1.3.9",
7
7
  "description": "Mythix CLI utility",
8
8
  "main": "src/index.js",
9
9
  "scripts": {