Skip to content

Commit 2ee8394

Browse files
committed
fix; default config directory
1 parent dc6d2ef commit 2ee8394

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cg.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ var argv = require('yargs')
4444

4545
let configStr = argv._[0] || 'nodejs';
4646
let configName = path.basename(configStr);
47-
let configPath = path.dirname(configStr) || './configs';
47+
let configPath = path.dirname(configStr);
48+
if (!configPath || (configPath === '.')) configPath = './configs';
4849
let configFile = path.resolve(configPath,configName)+'.json';
4950
let config = require(configFile);
5051
let defName = argv._[1] || './defs/petstore3.json';

0 commit comments

Comments
 (0)