Skip to content

Commit

Permalink
fix; default config directory
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeRalphson committed Apr 2, 2018
1 parent dc6d2ef commit 2ee8394
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cg.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ var argv = require('yargs')

let configStr = argv._[0] || 'nodejs';
let configName = path.basename(configStr);
let configPath = path.dirname(configStr) || './configs';
let configPath = path.dirname(configStr);
if (!configPath || (configPath === '.')) configPath = './configs';
let configFile = path.resolve(configPath,configName)+'.json';
let config = require(configFile);
let defName = argv._[1] || './defs/petstore3.json';
Expand Down

0 comments on commit 2ee8394

Please sign in to comment.