Skip to content

Commit 7ef9d3a

Browse files
Cr 15741 (#773)
* validate codefresh run trigger args * validate the options at command level, instead inside the logic it self * fix error msg * trigger * Revert "validate codefresh run trigger args (#770)" This reverts commit a6c04ad. * revert * add deprecation warnning msg * fix warning msg * remove deprecation info on help
1 parent d0f378a commit 7ef9d3a

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

lib/interface/cli/commands/pipeline/run.cmd.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const debug = require('debug')('codefresh:cli:run:pipeline');
2+
const colors = require('colors');
23
const Command = require('../../Command');
34
const { crudFilenameOption } = require('../../helpers/general');
45
const RunLocalCommand = require('./run.local');
@@ -23,6 +24,14 @@ const run = new Command({
2324
},
2425
builder: (yargs) => {
2526
yargs
27+
.check((argv) => {
28+
const { trigger, branch, sha } = argv;
29+
30+
if ((branch || sha) && !trigger) {
31+
console.log(colors.yellow('Deprecation warning: usage of --sha or --branch without --trigger flag is deprecated'));
32+
}
33+
return true;
34+
})
2635
.option('trigger', {
2736
describe: 'Trigger id or name',
2837
alias: 't',

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.81.2",
3+
"version": "0.81.3",
44
"description": "Codefresh command line utility",
55
"main": "index.js",
66
"preferGlobal": true,

0 commit comments

Comments
 (0)