Skip to content

Commit

Permalink
Saas 6975 1 (#463)
Browse files Browse the repository at this point in the history
* create mock progress reporter when token does not support runner-install scope
  • Loading branch information
Oleg Sucharevich authored May 19, 2020
1 parent bcc5e8d commit 25842a3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
13 changes: 11 additions & 2 deletions lib/interface/cli/commands/hybrid/installation-process.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
const Promise = require('bluebird');
const { to } = require('./../../../../logic/cli-config/errors/awaitTo');

async function create(installer, event) {
const res = await installer.createNewInstallationProgress(event);
const [err, res] = await to(installer.createNewInstallationProgress(event));
if (err) {
return {};
}
return res.progress;
}

function buildReporter(installer, progress) {
return {
report: (event, status, options = {}) => {
report: async (event, status, options = {}) => {
if (!progress.id) {
return Promise.resolve();
}
const data = {
event,
content: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codefresh",
"version": "0.63.2",
"version": "0.63.3",
"description": "Codefresh command line utility",
"main": "index.js",
"preferGlobal": true,
Expand Down

0 comments on commit 25842a3

Please sign in to comment.