You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "slawekjaranowski (via GitHub)" <gi...@apache.org> on 2023/03/10 16:47:15 UTC

[GitHub] [maven-help-plugin] slawekjaranowski commented on a diff in pull request #89: [MPH-197] Upgrade plexus-utils to 3.5.1

slawekjaranowski commented on code in PR #89:
URL: https://github.com/apache/maven-help-plugin/pull/89#discussion_r1132613802


##########
src/main/java/org/apache/maven/plugins/help/SystemMojo.java:
##########
@@ -67,14 +67,10 @@ public void execute() throws MojoExecutionException {
         message.append(StringUtils.repeat("=", LINE_LENGTH)).append(LS);
         message.append("Environment Variables").append(LS);
         message.append(StringUtils.repeat("=", LINE_LENGTH)).append(LS);
-        try {
-            Properties envVars = CommandLineUtils.getSystemEnvVars();
-            for (String key : envVars.stringPropertyNames()) {
-                message.append(LS);
-                message.append(key).append("=").append(envVars.getProperty(key));
-            }
-        } catch (IOException e) {
-            getLog().warn("Unable to get the environment variables: " + e.getMessage());
+        Properties envVars = CommandLineUtils.getSystemEnvVars();

Review Comment:
   Why not `System.getenv()` 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org