Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
Fixes Issue vkarpov15#13
  • Loading branch information
chaiwa-berian committed Nov 15, 2018
1 parent 33efa74 commit ba26d0f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,13 @@ function* run() {
}
}

const dbPath = typeof commander.dbpath === 'string' ? `${commander.dbpath}` : './data';
let dbPath;
if(typeof commander.dbpath === 'string'){
dbPath = `${commander.dbpath}` ;
}
else {
dbPath = isWin ? 'data' : './data';
}

if (!fs.existsSync(`${dbPath}`)) {
execSync(isWin ? `md .\\${dbPath}` : `mkdir -p ${dbPath}`);
Expand Down

0 comments on commit ba26d0f

Please sign in to comment.