diff --git a/src/commands/server/start.ts b/src/commands/server/start.ts index ac8f3459a..cbc31aee1 100644 --- a/src/commands/server/start.ts +++ b/src/commands/server/start.ts @@ -96,8 +96,9 @@ export default class Start extends Command { }), installer: string({ char: 'a', - description: 'Installer type', + description: `Installer type.${isStableVersion({}) ? ' If not set, default is "olm" for OpenShift 4.x platform otherwise "operator".' : ''}`, options: ['helm', 'operator', 'olm', 'minishift-addon'], + default: `${isStableVersion({}) ? '' : 'operator'}`, }), domain: string({ char: 'b', @@ -199,6 +200,7 @@ export default class Start extends Command { if (!flags.installer) { await this.setDefaultInstaller(flags) + cli.info(`› Installer type is set to: '${flags.installer}'`) } if (!flags.templates) { @@ -441,7 +443,6 @@ export default class Start extends Command { flags.installer = 'olm' } else { flags.installer = 'operator' - cli.info(`› Installer type is set to: '${flags.installer}'`) } } } diff --git a/src/commands/server/update.ts b/src/commands/server/update.ts index 57e27fc23..f389d4e97 100644 --- a/src/commands/server/update.ts +++ b/src/commands/server/update.ts @@ -33,8 +33,8 @@ export default class Update extends Command { static flags = { installer: string({ char: 'a', - description: 'Installer type', - options: ['helm', 'operator', 'minishift-addon', 'olm'], + description: 'Installer type. If not set, default is autodetected depending on previous installation.', + options: ['operator', 'olm'], }), platform: string({ char: 'p', @@ -75,9 +75,9 @@ export default class Update extends Command { } async checkIfInstallerSupportUpdating(flags: any) { - // matrix checks if (!flags.installer) { await this.setDefaultInstaller(flags) + cli.info(`› Installer type is set to: '${flags.installer}'`) } if (flags.installer === 'operator' || flags.installer === 'olm') { @@ -85,14 +85,9 @@ export default class Update extends Command { return } - if (flags.installer === 'minishift-addon' || flags.installer === 'helm') { - this.error(`🛑 The specified installer ${flags.installer} does not support updating yet.`) - } if (flags.installer === 'olm' && flags.platform === 'minishift') { this.error(`🛑 The specified installer ${flags.installer} does not support Minishift`) } - - this.error(`🛑 Unknown installer ${flags.installer} is specified.`) } async run() { @@ -186,6 +181,5 @@ export default class Update extends Command { } catch { flags.installer = 'operator' } - cli.info(`› Installer type is set to: '${flags.installer}'`) } } diff --git a/yarn.lock b/yarn.lock index d4eddcb78..8a5719a26 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1540,16 +1540,15 @@ ecc-jsbn@~0.1.1: "eclipse-che-minishift@git://github.com/minishift/minishift#master": version "0.0.0" - resolved "git://github.com/minishift/minishift#c50597deacee626c655d8207642b343ba10839c1" + resolved "git://github.com/minishift/minishift#015bd7f9ec73ff38bbd8e7faa66f9ab60c5cabf6" "eclipse-che-operator@git://github.com/eclipse/che-operator#master": version "0.0.0" - uid c4a3ff2480740190f97feb3e6c85029506561e8c resolved "git://github.com/eclipse/che-operator#c4a3ff2480740190f97feb3e6c85029506561e8c" "eclipse-che@git://github.com/eclipse/che#master": version "0.0.0" - resolved "git://github.com/eclipse/che#7cf97838a4492f4b20327adf0cba5f4c8033fbd7" + resolved "git://github.com/eclipse/che#593f91515f368dc6d76e1f09113e4d61c562aa46" editorconfig@^0.15.0: version "0.15.3"