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

    https://github.com/apache/incubator-brooklyn/pull/866#discussion_r37965596
  
    --- Diff: 
software/base/src/main/java/org/apache/brooklyn/entity/software/base/AbstractSoftwareProcessWinRmDriver.java
 ---
    @@ -129,10 +132,40 @@ protected WinRmToolResponse 
executeCommand(ConfigKey<String> regularCommandKey,
                 throw new IllegalStateException(String.format("%s and %s 
cannot both be set", regularCommandKey.getName(), 
powershellCommandKey.getName()));
             }
     
    +        WinRmToolResponse response;
             if (Strings.isNullOrEmpty(regularCommand)) {
    -            return 
getLocation().executePsScript(ImmutableList.of(powershellCommand));
    +            response = 
getLocation().executePsScript(ImmutableList.of(powershellCommand));
             } else {
    -            return 
getLocation().executeScript(ImmutableList.of(regularCommand));
    +            response = 
getLocation().executeScript(ImmutableList.of(regularCommand));
    +        }
    +
    +        if (Tasks.current()!=null) {
    --- End diff --
    
    I'd be inclined to add the `tagDynamicallyWithSoftStream` before executing 
the script. Then after the script has executed, update that stream with the 
contents of `response.getStdOut()` etc.
    
    If you did that, then while the command is executing you'd be able to 
inspect the stdin of the command and you'd be able to see that there will be a 
stdout/stderr (but they would be empty). The alternative here would be 
surprising for users (i.e. in the activity view, it does not show that there 
will be any streams; then when you navigate away from the task and back again 
once it's finished it shows that there are now streams).


---
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