karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject [1/2] karaf git commit: [KARAF-5328] Fix NullPointerException when client/ssh execute source command
Date Thu, 07 Sep 2017 12:37:37 GMT
Repository: karaf
Updated Branches:
  refs/heads/master dfdd40bc9 -> 4c740f535


[KARAF-5328] Fix NullPointerException when client/ssh execute source command


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/3a7e5c10
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/3a7e5c10
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/3a7e5c10

Branch: refs/heads/master
Commit: 3a7e5c1027db75b4221371d2294367c67d5a5ee7
Parents: dfdd40b
Author: Xilai Dai <xldai@talend.com>
Authored: Wed Sep 6 11:07:48 2017 +0800
Committer: Jean-Baptiste Onofré <jbonofre@apache.org>
Committed: Thu Sep 7 14:19:00 2017 +0200

----------------------------------------------------------------------
 .../org/apache/karaf/shell/impl/console/HeadlessSessionImpl.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/3a7e5c10/shell/core/src/main/java/org/apache/karaf/shell/impl/console/HeadlessSessionImpl.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/HeadlessSessionImpl.java
b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/HeadlessSessionImpl.java
index e82f6f0..cc2f6a7 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/HeadlessSessionImpl.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/HeadlessSessionImpl.java
@@ -22,6 +22,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.PrintStream;
 import java.nio.file.Path;
+import java.nio.file.Paths;
 import java.util.EnumSet;
 import java.util.List;
 import java.util.Properties;
@@ -79,7 +80,7 @@ public class HeadlessSessionImpl implements Session {
             session.put("USER", ShellUtil.getCurrentUserName());
             session.put("APPLICATION", System.getProperty("karaf.name", "root"));
         }
-        session.currentDir(null);
+        session.currentDir(Paths.get(System.getProperty("user.dir")).toAbsolutePath().normalize());
     }
 
     public CommandSession getSession() {


Mime
View raw message