brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Capture exit code in AbstractSoft...
Date Sat, 19 Sep 2015 14:59:26 GMT
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/906#discussion_r39920429
  
    --- Diff: software/base/src/main/java/org/apache/brooklyn/entity/software/base/AbstractSoftwareProcessWinRmDriver.java
---
    @@ -134,17 +189,20 @@ protected void createDirectory(String directoryName, String summaryForLogging)
{
             getLocation().executePsScript("New-Item -path \"" + directoryName + "\" -type
directory -ErrorAction SilentlyContinue");
         }
     
    -    protected WinRmToolResponse executeCommand(ConfigKey<String> regularCommandKey,
ConfigKey<String> powershellCommandKey, boolean allowNoOp) {
    -        String regularCommand = getEntity().getConfig(regularCommandKey);
    -        String powershellCommand = getEntity().getConfig(powershellCommandKey);
    -        if (Strings.isBlank(regularCommand) && Strings.isBlank(powershellCommand))
{
    +    public int executeCommandInTask(String regularCommand, String powershellCommand,
String phase, Boolean allowNoOp) {
    --- End diff --
    
    It is surprising that the presence of the `Boolean allowNoOp` in the overloaded method
causes it to go down a completely different code path, not calling `newScript(...)...` in
the same was as the other `executeCommandInTask` method.
    
    Do you really mean for this `executeCommandInTask` method that it is *not* executed in
a task? Or should it do the no-op guard, and then delegate to the other `executeCommandInTask`
method?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message