Github user bostko commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/596#discussion_r106206363
--- Diff:
software/winrm/src/main/java/org/apache/brooklyn/core/sensor/windows/WinRmCommandSensor.java
---
@@ -144,15 +144,7 @@ public T apply(String input) {
public static String makeCommandExecutingInDirectory(String command,
String executionDir, Entity entity) {
String finalCommand = command;
String execDir = executionDir;
- if (Strings.isBlank(execDir)) {
- // default to run dir
- execDir = entity.getAttribute(BrooklynConfigKeys.RUN_DIR);
- // if no run dir, default to home
- if (Strings.isBlank(execDir)) {
- execDir = "%USERPROFILE%";
- }
- }
- if (!"~".equals(execDir)) {
+ if (Strings.isNonBlank(execDir) && !"~".equals(execDir)) {
--- End diff --
That's why empty has the same meaning as `~`.
---
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.
---