TC_INITSCRIPT support absolute/relative path#904
TC_INITSCRIPT support absolute/relative path#904basicfu wants to merge 0 commit intotestcontainers:masterfrom basicfu:master
Conversation
|
This is a good idea - thanks for raising the PR! I'm just not quite sure about the How about |
|
I agree with |
modules/jdbc/src/main/java/org/testcontainers/jdbc/ContainerDatabaseDriver.java
Outdated
Show resolved
Hide resolved
|
Hi @kiview, I have already modified |
| URL resource; | ||
| if (initScriptPath.startsWith(FILE_PATH_PREFIX)) { | ||
| //relative project path | ||
| String relativePath = System.getProperty("user.dir") + "/" + initScriptPath.substring(FILE_PATH_PREFIX.length()); |
There was a problem hiding this comment.
why are you using user.dir here?
Also, why not just return new URL(initScriptPath)? :)
There was a problem hiding this comment.
use user.dir Use the project path
|
I'll pick this up - will remove |
|
Sorry, I didn't mean to close this PR. I've reopened as #1329 with a couple of tweaks. |
see #850
TC_INITSCRIPT Add two path way
root:prefix,relative root path