This is an automated email from the ASF dual-hosted git repository.
technoboy pushed a commit to branch branch-2.11
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/branch-2.11 by this push:
new c7e81a5d166 [fix][cli] Pulsar shell: support relative paths
(cliextensions) (#17648)
c7e81a5d166 is described below
commit c7e81a5d166b706f6cc27453ed6c5ea4bbf7ea3d
Author: Nicolò Boschi <[email protected]>
AuthorDate: Thu Sep 15 12:07:34 2022 +0200
[fix][cli] Pulsar shell: support relative paths (cliextensions) (#17648)
---
bin/pulsar-shell | 2 ++
bin/pulsar-shell.cmd | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/bin/pulsar-shell b/bin/pulsar-shell
index ca3533fb9ec..71d427ca752 100755
--- a/bin/pulsar-shell
+++ b/bin/pulsar-shell
@@ -37,4 +37,6 @@ OPTS="-Dorg.jline.terminal.jansi=false $OPTS"
OPTS="-Dpulsar.shell.working.dir=$(pwd) $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 e8d0a59e4d9..ffc1b4f6bf2 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