diff --git a/bin/pulsar-shell b/bin/pulsar-shell index b0ad7cec84d8e..2934e65db5361 100755 --- a/bin/pulsar-shell +++ b/bin/pulsar-shell @@ -36,4 +36,6 @@ export PULSAR_HOME=`cd -P $BINDIR/..;pwd` OPTS="-Dorg.jline.terminal.jansi=false $OPTS" DEFAULT_CONFIG="-Dpulsar.shell.config.default=$PULSAR_CLIENT_CONF" +#Change to PULSAR_HOME to support relative paths +cd "$PULSAR_HOME" exec $JAVA $OPTS $DEFAULT_CONFIG org.apache.pulsar.shell.PulsarShell "$@" \ No newline at end of file diff --git a/bin/pulsar-shell.cmd b/bin/pulsar-shell.cmd index e8d0a59e4d9fd..ffc1b4f6bf2f3 100644 --- a/bin/pulsar-shell.cmd +++ b/bin/pulsar-shell.cmd @@ -29,5 +29,5 @@ if ERRORLEVEL 1 ( set "OPTS=%OPTS% -Dorg.jline.terminal.jansi=false" set "DEFAULT_CONFIG=-Dpulsar.shell.config.default="%PULSAR_CLIENT_CONF%"" - +cd "%PULSAR_HOME%" "%JAVACMD%" %OPTS% %DEFAULT_CONFIG% org.apache.pulsar.shell.PulsarShell %* \ No newline at end of file