Require user to agree to license #919
Labels
CLI
IDEasy command-line-interface (parsing args, etc.)
core
FileAccess, ProcessUtil, IdeContext, etc.
enhancement
New feature or request
Milestone
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.agreement
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:
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 levelINTERACTION
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.The text was updated successfully, but these errors were encountered: