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.
- package/bin/runner.js +16 -5
- 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
|
|
391
|
-
let mythixPath
|
|
392
|
-
let mythixCLIPAth
|
|
393
|
-
let mythixCLI
|
|
394
|
-
let 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')
|