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 Fri, 18 Sep 2015 08:26:44 GMT
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/906#discussion_r39833656
  
    --- Diff: software/base/src/main/java/org/apache/brooklyn/entity/software/base/AbstractSoftwareProcessWinRmDriver.java
---
    @@ -60,10 +66,27 @@ public AbstractSoftwareProcessWinRmDriver(EntityLocal entity, WinRmMachineLocati
             entity.setAttribute(WINDOWS_PASSWORD, location.config().get(WinRmMachineLocation.PASSWORD));
         }
     
    +    /** @see #newScript(Map, String) */
    +    protected WinRmExecuteHelper newScript(String phase) {
    +        return newScript(Maps.<String, Object>newLinkedHashMap(), phase);
    +    }
    +
    +    protected WinRmExecuteHelper newScript(Map<String, ?> flags, String phase)
{
    +        if (!Entities.isManaged(getEntity()))
    +            throw new IllegalStateException(getEntity() + " is no longer managed; cannot
create script to run here (" + phase + ")");
    +
    +        WinRmExecuteHelper s = new WinRmExecuteHelper(this, phase + " " + elvis(entity,
this));
    +        return s;
    +    }
    +
         @Override
         public void runPreInstallCommand() {
             if (Strings.isNonBlank(getEntity().getConfig(VanillaWindowsProcess.PRE_INSTALL_COMMAND))
|| Strings.isNonBlank(getEntity().getConfig(VanillaWindowsProcess.PRE_INSTALL_POWERSHELL_COMMAND)))
{
    -            executeCommand(VanillaWindowsProcess.PRE_INSTALL_COMMAND, VanillaWindowsProcess.PRE_INSTALL_POWERSHELL_COMMAND,
true);
    +            executeCommand(
    --- End diff --
    
    Why is this method using `executeCommand`, but the other methods use `executeNativeOrPsCommand`?


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