Skip to content

Commit

Permalink
fix: cli path
Browse files Browse the repository at this point in the history
Refs: #30
  • Loading branch information
tshemsedinov committed Sep 16, 2020
1 parent 9bef5d8 commit 1505e16
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ const metasql = require('..');

const [,, command, version] = process.argv;

const schemaPath = path.join(__dirname, '../application/schemas');
const dir = __dirname.includes('node_modules')
? process.cwd()
: path.join(__dirname, '..');
const schemaPath = path.join(dir, 'application/schemas');

if (command === 'c') {
metasql.create(schemaPath, schemaPath);
Expand Down

0 comments on commit 1505e16

Please sign in to comment.