Multiple jvmOptions not possible
malins opened this issue · 3 comments
malins commented
Describe the issue
I'm not able to pass multiple values via jvmOptions.
What you are trying to do
I want to pass multiple CORS configuration values via jvmOptions, but as soon as two or more java environment properties are passed, none is correctly evaluated.
mockserver.start_mockserver({
serverPort: 1080,
jvmOptions: "-Dmockserver.enableCORSForAllResponses=true -Dmockserver.corsAllowCredentials=true"
});
I also tried to pass it as a array, but this doesn't work neither.
Possible fix
index.js
if (options.jvmOptions) {
if (Array.isArray(options.jvmOptions) {
commandLineOptions.push.apply(commandLineOptions, options.jvmOptions);
} else {
commandLineOptions.push(options.jvmOptions);
}
}
MockServer version
5.11.2
vlad-tymoshchyk commented
#33
Opened PR with possible fix
brulks107 commented
@jamesdbloom I have the same problem. Is it possible to merge the PR #33 ?
Thank you
jamesdbloom commented
PR merged so closing ticket soon this will be release.