-
Notifications
You must be signed in to change notification settings - Fork 62
Log command before asking user for sudo password #415
Copy link
Copy link
Labels
CLIIDEasy command-line-interface (parsing args, etc.)IDEasy command-line-interface (parsing args, etc.)enhancementNew feature or requestNew feature or requestinstallinstallation process of IDE + tools and install commandletinstallation process of IDE + tools and install commandletlinuxspecific for linux OS (debian, ubunutu, suse, etc.)specific for linux OS (debian, ubunutu, suse, etc.)
Milestone
Metadata
Metadata
Assignees
Labels
CLIIDEasy command-line-interface (parsing args, etc.)IDEasy command-line-interface (parsing args, etc.)enhancementNew feature or requestNew feature or requestinstallinstallation process of IDE + tools and install commandletinstallation process of IDE + tools and install commandletlinuxspecific for linux OS (debian, ubunutu, suse, etc.)specific for linux OS (debian, ubunutu, suse, etc.)
Type
Projects
Status
✅ Done
From Review of PR #409:
What I think we need to consider for runWithPackageManager is that we need to add logging of the executed command in ProcessContext before actually executing the process.
Rationale
A linux user cannot be blindly prompted for its root password from sudo without knowing what is actually happening and what command is to be executed.
Requirement
Then runWithPackageManager should log an according message on log-level interaction. So that you get something like this:
Please note that we also need this for other things than just global tool installations with
runWithPackageManagerbut also e.g. for #453Therefore the logging itself should be implemented in a method that can be reused for other use-cases than
executePackageManagerCommand.Hint
Needs to be added here:
IDEasy/cli/src/main/java/com/devonfw/tools/ide/tool/GlobalToolCommandlet.java
Line 82 in f1b1801