Before we go out of beta we need to implement a feature that the user has to agree to our license.
The idea is as following:
- User gets informed that this is our license: https://github.com/devonfw/IDEasy/blob/main/documentation/LICENSE.adoc
- User once needs to confirm to the license agreement so he will be ask if he accepts the license.
- Like in devonfw-ide we mark this agreement in a file
~/.ide/.license.agreement
- Once this file is already present, the user will not be asked again.
While this is planned for the installers (see #420 or #423) this should also be added to our CLI as a legal requirement before we go out of beta.
So the installer will create the same .license.agreement but if I installed IDEasy not via installer (e.g. because it does not yet exist or because I bypassed it by downloading the portal package) the CLI should do the same.
Unlike IDEasy we should not open browser windows automagically what caused a lot of confusion but just print the URL to the license, ask the user to read and confirm it. If he does not confirm the CLI will exit and not perform anything else.
Old implementation in devonfw-ide:
https://github.com/devonfw/ide/blob/8698d2ba7468d34aec82c86fabdb09b5ee84d9c8/scripts/src/main/resources/scripts/functions#L354-L385
New implementation should go somewhere around here:
Challenge is that the license agreement is a question (e.g. via askToContinue) that will use logging on level INTERACTION but that is invisible for Commandlets with processable output. Maybe we have to temporary enable such log-levels if the license is not yet agreed and then restore the previous logger state after that.
Before we go out of beta we need to implement a feature that the user has to agree to our license.
The idea is as following:
~/.ide/.license.agreementWhile this is planned for the installers (see #420 or #423) this should also be added to our CLI as a legal requirement before we go out of beta.
So the installer will create the same
.license.agreementbut if I installed IDEasy not via installer (e.g. because it does not yet exist or because I bypassed it by downloading the portal package) the CLI should do the same.Unlike IDEasy we should not open browser windows automagically what caused a lot of confusion but just print the URL to the license, ask the user to read and confirm it. If he does not confirm the CLI will exit and not perform anything else.
Old implementation in devonfw-ide:
https://github.com/devonfw/ide/blob/8698d2ba7468d34aec82c86fabdb09b5ee84d9c8/scripts/src/main/resources/scripts/functions#L354-L385
New implementation should go somewhere around here:
IDEasy/cli/src/main/java/com/devonfw/tools/ide/context/AbstractIdeContext.java
Line 867 in 8e971e1
Challenge is that the license agreement is a question (e.g. via
askToContinue) that will use logging on levelINTERACTIONbut that is invisible for Commandlets with processable output. Maybe we have to temporary enable such log-levels if the license is not yet agreed and then restore the previous logger state after that.