brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aleds...@apache.org
Subject [2/3] brooklyn-server git commit: WinRmCommandSensor executing in directory
Date Wed, 15 Mar 2017 14:05:04 GMT
WinRmCommandSensor executing in directory

Remove isAbsolutish sugar so dir like %USERPROFILE% works


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/1cbfb8d8
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/1cbfb8d8
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/1cbfb8d8

Branch: refs/heads/master
Commit: 1cbfb8d8420ff00ca6798e5a0e122c305143c792
Parents: d195219
Author: Valentin Aitken <bostko@gmail.com>
Authored: Wed Mar 15 14:15:06 2017 +0200
Committer: Valentin Aitken <bostko@gmail.com>
Committed: Wed Mar 15 15:31:39 2017 +0200

----------------------------------------------------------------------
 .../brooklyn/core/sensor/windows/WinRmCommandSensor.java       | 6 ------
 1 file changed, 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/1cbfb8d8/software/winrm/src/main/java/org/apache/brooklyn/core/sensor/windows/WinRmCommandSensor.java
----------------------------------------------------------------------
diff --git a/software/winrm/src/main/java/org/apache/brooklyn/core/sensor/windows/WinRmCommandSensor.java
b/software/winrm/src/main/java/org/apache/brooklyn/core/sensor/windows/WinRmCommandSensor.java
index e3e3ec1..18fd0ea 100644
--- a/software/winrm/src/main/java/org/apache/brooklyn/core/sensor/windows/WinRmCommandSensor.java
+++ b/software/winrm/src/main/java/org/apache/brooklyn/core/sensor/windows/WinRmCommandSensor.java
@@ -151,12 +151,6 @@ public final class WinRmCommandSensor<T> extends AddSensor<T>
{
             if (Strings.isBlank(execDir)) {
                 execDir = "%USERPROFILE%";
             }
-        } else if (!Os.isAbsolutish(execDir)) {
-            // relative paths taken wrt run dir
-            String runDir = entity.getAttribute(BrooklynConfigKeys.RUN_DIR);
-            if (!Strings.isBlank(runDir)) {
-                execDir = Os.mergePaths(runDir, execDir);
-            }
         }
         if (!"~".equals(execDir)) {
             finalCommand = "(if exist \"" + execDir + "\" (rundll32) else (mkdir \""+execDir+"\"))
&& cd \""+execDir+"\" && "+finalCommand;


Mime
View raw message