Github user geomacy commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/208#discussion_r67831641
  
    --- Diff: 
software/base/src/main/java/org/apache/brooklyn/entity/software/base/AbstractSoftwareProcessSshDriver.java
 ---
    @@ -344,9 +346,23 @@ public void runPostLaunchCommand() {
          * @see SoftwareProcess#SHELL_ENVIRONMENT
          */
         public Map<String, String> getShellEnvironment() {
    -        return 
Strings.toStringMap(entity.getConfig(SoftwareProcess.SHELL_ENVIRONMENT), "");
    +        Map<String, Object> env = 
entity.getConfig(SoftwareProcess.SHELL_ENVIRONMENT);
    +        if (env == null) {
    +            return null;
    +        }
    +        ShellEnvironmentSerializer envSerializer = new 
ShellEnvironmentSerializer(((EntityInternal)entity).getManagementContext());
    +        Map<String, String> serializedEnv = Maps.newHashMap();
    +        for (Entry<String, Object> entry : env.entrySet()) {
    +            String key = serializeShellEnv(envSerializer, entry.getKey());
    --- End diff --
    
    Is it really necessary to serialise the key?  It might even be worth 
checking here precisely that the key matches the requirements for names of 
environment variables?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to