Closed wajda closed 1 year ago
What if the upgrade is run via script, not manually, will this cause issue in such a case? Should there be some -y
option to agree automatically?
What if the upgrade is run via script, not manually, will this cause issue in such a case? Should there be some
-y
option to agree automatically?
All the user interactions are enabled when there is a console. In scripts, or e.g. when you run it from IDEA etc when the console is not attached to the process the above message won't appear. The main intention for this feature is just to remind the user about the necessity of database backup. In script it would be too late anyway.
@korbelm , do you think we should print it even in the non-interactive mode, effectively always requiring -y
option in addition to db-upgrade
while running it from scripts?
i would keep -y
even for automated run (other sw do) as it should make users more aware of potential risks, from my point of view there is no need to have separate behaviour
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
1 Code Smell
No Coverage information
0.0% Duplication
Added the --non-interactive
flag suggested above. I didn't use -y
as it implies "yes", but there are also other prompts in the Admin CLI, not just yes/no.
The updated logic is the following:
--non-interactive
flag is used, regardless of the console availability the process just carries on after printing the corresponding warning message.--non-interactive
is NOT used then the behavior depends on the console availability. If it's available, the command acts interactively
Fixes #1191
Result: