mirror of
https://github.com/corda/corda.git
synced 2025-01-30 16:14:39 +00:00
CORDA-2876: Ensure NodeConfig does not have devModeOptions outside of devMode. (#5676)
This commit is contained in:
parent
f226ddc4f2
commit
02ed8e91b3
@ -736,10 +736,14 @@ class DriverDSLImpl(
|
||||
* These will all be ignored unless devMode is also true.
|
||||
*/
|
||||
private fun Config.withDJVMConfig(bootstrapSource: Path?, cordaSource: List<Path>): Config {
|
||||
return if (hasPath("devMode") && getBoolean("devMode")) {
|
||||
withOptionalValue("devModeOptions.djvm.bootstrapSource", bootstrapSource) { path ->
|
||||
valueFor(path.toString())
|
||||
}.withValue("devModeOptions.djvm.cordaSource", valueFor(cordaSource.map(Path::toString)))
|
||||
return if (hasPath("devMode")) {
|
||||
if (getBoolean("devMode")) {
|
||||
withOptionalValue("devModeOptions.djvm.bootstrapSource", bootstrapSource) { path ->
|
||||
valueFor(path.toString())
|
||||
}.withValue("devModeOptions.djvm.cordaSource", valueFor(cordaSource.map(Path::toString)))
|
||||
} else {
|
||||
withoutPath("devModeOptions")
|
||||
}
|
||||
} else {
|
||||
this
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user