Skip to content

Commit 25842a3

Browse files
author
Oleg Sucharevich
authored
Saas 6975 1 (#463)
* create mock progress reporter when token does not support runner-install scope
1 parent bcc5e8d commit 25842a3

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

lib/interface/cli/commands/hybrid/installation-process.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
1+
const Promise = require('bluebird');
2+
const { to } = require('./../../../../logic/cli-config/errors/awaitTo');
3+
14
async function create(installer, event) {
2-
const res = await installer.createNewInstallationProgress(event);
5+
const [err, res] = await to(installer.createNewInstallationProgress(event));
6+
if (err) {
7+
return {};
8+
}
39
return res.progress;
410
}
511

612
function buildReporter(installer, progress) {
713
return {
8-
report: (event, status, options = {}) => {
14+
report: async (event, status, options = {}) => {
15+
if (!progress.id) {
16+
return Promise.resolve();
17+
}
918
const data = {
1019
event,
1120
content: {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codefresh",
3-
"version": "0.63.2",
3+
"version": "0.63.3",
44
"description": "Codefresh command line utility",
55
"main": "index.js",
66
"preferGlobal": true,

0 commit comments

Comments
 (0)