Skip to content

Commit

Permalink
fix(cubejs-cli): Check if correct directory is being deployed
Browse files Browse the repository at this point in the history
  • Loading branch information
paveltiunov committed Jun 10, 2020
1 parent bcfeb3f commit 56b8319
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/cubejs-cli/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@ const fs = require('fs-extra');
const path = require('path');
const cliProgress = require('cli-progress');
const DeployDir = require('./DeployDir');
const { logStage } = require('./utils');
const { logStage, displayError } = require('./utils');
const Config = require('./Config');

exports.deploy = async ({ directory, auth }) => {
if (!(await fs.pathExists(path.join(process.cwd(), 'node_modules', '@cubejs-backend/server-core')))) {
await displayError(
'@cubejs-backend/server-core dependency not found. Please run deploy command from project root directory and ensure npm install has been run.'
);
}

const config = new Config();
await config.loadDeployAuth();
const bar = new cliProgress.SingleBar({
Expand Down

0 comments on commit 56b8319

Please sign in to comment.