QuakeWang commented on a change in pull request #6101:
URL: https://github.com/apache/dolphinscheduler/pull/6101#discussion_r706307043



##########
File path: 
dolphinscheduler-standalone-server/src/main/java/org/apache/dolphinscheduler/server/StandaloneServer.java
##########
@@ -114,4 +115,21 @@ private static void startDatabase() throws IOException, 
SQLException {
         final ScriptRunner runner = new ScriptRunner(ds.getConnection(), true, 
true);
         runner.runScript(new FileReader("sql/dolphinscheduler_h2.sql"));
     }
+
+    public static String getCurrentPath(Class<?> cls) {
+        String path = 
cls.getProtectionDomain().getCodeSource().getLocation().getPath();
+        path = path.replaceFirst("file:/", "");
+        path = path.replaceAll("!/", "");

Review comment:
       > I suppose there should not be `!/` in the path, because this path is 
only use when running in IDE, if it's run in distribution package, like using 
command line, it will fall back to the configuration in `registry.properties`
   
   Do you mean that remove `path = path.replaceAll("!/", "");` ?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to