Skip to content

Commit

Permalink
fix(cubejs-cli): Correct missing auth error
Browse files Browse the repository at this point in the history
  • Loading branch information
paveltiunov committed Jun 9, 2020
1 parent 3ba2fbc commit ceeaff7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/cubejs-cli/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ const { logStage } = require('./utils');
const cloudReq = (options) => {
const { url, auth, ...restOptions } = options;
const authorization = auth || process.env.CUBE_CLOUD_DEPLOY_AUTH;
if (!authorization) {
throw new (`CUBE_CLOUD_DEPLOY_AUTH isn't set`);
}
const payload = jwt.decode(authorization);
if (!payload.url || !payload.deploymentId) {
throw new (`Malformed token: ${authorization}`);
Expand Down

0 comments on commit ceeaff7

Please sign in to comment.