Malformed argument has embedded quote

#1

We’re seeing an issue with winrs deployments when using JDK 8u231 or JDK 11.0.5 -

Caused by: java.io.IOException: Cannot run program “cmd”: Malformed argument has embedded quote: winrs -remote:dev-tools-1:5985 -username:loser\svc_devops_tools -password:********** powershell -ExecutionPolicy Unrestricted -Inputformat None -NonInteractive -NoProfile -Command “$ErrorActionPreference = ‘Stop’; & C:\windows\temp\ot-20200109T094919393.1\deploy-webcontent.ps1; if($LastExitCode) { Exit $LastExitCode; }”

The behavior may appear in other areas as well. Java release notes describe the issue - https://www.oracle.com/technetwork/java/javase/8u231-relnotes-5592812.html#JDK-8221858
https://www.oracle.com/technetwork/java/javase/11-0-5-oracle-relnotes-5592801.html#JDK-8221858

To work around this issue, add the additional java parameter discussed in the release notes to the wrapper configuration file and restart the application -

wrapper.java.additional.7=-Djdk.lang.Process.allowAmbiguousCommands=true