Skip to content

Commit 34a0049

Browse files
author
Shu Jiaming
committed
ZEPPELIN-2841 fix a bug where shell interpreter complained that working directory '.' can not be found while zeppelin was running in docker enviroment.
1 parent d02104a commit 34a0049

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

shell/src/main/java/org/apache/zeppelin/shell/ShellInterpreter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import java.io.ByteArrayOutputStream;
2121
import java.io.IOException;
2222
import java.io.OutputStream;
23+
import java.io.File;
2324
import java.util.List;
2425
import java.util.Properties;
2526
import java.util.concurrent.ConcurrentHashMap;
@@ -98,6 +99,7 @@ public InterpreterResult interpret(String cmd, InterpreterContext contextInterpr
9899
contextInterpreter.out, contextInterpreter.out));
99100
executor.setWatchdog(new ExecuteWatchdog(Long.valueOf(getProperty(TIMEOUT_PROPERTY))));
100101
executors.put(contextInterpreter.getParagraphId(), executor);
102+
executor.setWorkingDirectory(new File(System.getProperty("user.home")));
101103
int exitVal = executor.execute(cmdLine);
102104
LOGGER.info("Paragraph " + contextInterpreter.getParagraphId()
103105
+ " return with exit value: " + exitVal);

0 commit comments

Comments
 (0)