File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
lib/interface/cli/commands/hybrid Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ const { prettyError } = require('../../../../logic/cli-config/errors/helpers');
19
19
20
20
const INSTALLATION_DEFAULTS = {
21
21
NAMESPACE : 'codefresh' ,
22
- MAKE_DEFAULT_RE : true ,
22
+ MAKE_DEFAULT_RE : false ,
23
23
RUN_DEMO_PIPELINE : true ,
24
24
DEMO_PIPELINE_NAME : 'Codefresh-Runner Demo' ,
25
25
CF_CONTEXT_NAME : 'cf-runner' ,
@@ -265,11 +265,23 @@ const initCmd = new Command({
265
265
// if this is a new account, don't ask and set this runtime as default
266
266
shouldMakeDefaultRe = true ;
267
267
} else {
268
+ let message = 'Set this as the default runtime environment for your Codefresh account? (Y/N)' ;
269
+
270
+ const [ listReErr , runtimes ] = await to ( sdk . runtimeEnvs . list ( { } ) ) ;
271
+ if ( listReErr ) {
272
+ console . debug ( 'Failed to fetch runtimes' ) ;
273
+ } else {
274
+ const defaultRe = _ . find ( runtimes , re => re . default ) ;
275
+ if ( defaultRe ) {
276
+ message = `Change the current default runtime ${ defaultRe . metadata . name } to new runtime ?` ;
277
+ }
278
+ }
279
+
268
280
questions . push ( {
269
281
type : 'confirm' ,
270
282
name : 'shouldMakeDefaultRe' ,
271
283
default : INSTALLATION_DEFAULTS . MAKE_DEFAULT_RE ,
272
- message : 'Set this as the default runtime environment for your Codefresh account? (Y/N)' ,
284
+ message,
273
285
} ) ;
274
286
}
275
287
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " codefresh" ,
3
- "version" : " 0.64.3 " ,
3
+ "version" : " 0.64.4 " ,
4
4
"description" : " Codefresh command line utility" ,
5
5
"main" : " index.js" ,
6
6
"preferGlobal" : true ,
You can’t perform that action at this time.
0 commit comments