You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2021/09/10 16:14:05 UTC
[GitHub] [dolphinscheduler] QuakeWang commented on a change in pull request #6101: [Issue-6091] Fix the StandaloneServer that support Windows Index
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org