diff options
author | Roland Grunberg | 2017-08-15 17:23:04 +0000 |
---|---|---|
committer | Roland Grunberg | 2017-08-25 14:03:32 +0000 |
commit | cb88e4fda2b0460d21268bf25845ded90d60562c (patch) | |
tree | 72216905a1c2d5e00aa68a28028a05aa98c5db0b | |
parent | 4078f5f08940405930f43306c93f50556ce70447 (diff) | |
download | org.eclipse.linuxtools-cb88e4fda2b0460d21268bf25845ded90d60562c.tar.gz org.eclipse.linuxtools-cb88e4fda2b0460d21268bf25845ded90d60562c.tar.xz org.eclipse.linuxtools-cb88e4fda2b0460d21268bf25845ded90d60562c.zip |
Handle double-quotes in output format.
Certain command-line outputs like docker-machine may present environment
information in the form KEY="VALUE" as opposed to KEY=VALUE .
Change-Id: Ie1bad04fc82626be081395d8e1f05276d323f42b
Reviewed-on: https://git.eclipse.org/r/103117
Tested-by: Hudson CI
Reviewed-by: Roland Grunberg <rgrunber@redhat.com>
(cherry picked from commit c8fe63b0a25ac9da6d776617a86d3a729b42c678)
Reviewed-on: https://git.eclipse.org/r/103660
-rw-r--r-- | containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/NewDockerConnectionPage.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/NewDockerConnectionPage.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/NewDockerConnectionPage.java index 9a75ca4c67..42df302e2c 100644 --- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/NewDockerConnectionPage.java +++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/NewDockerConnectionPage.java @@ -497,7 +497,7 @@ public class NewDockerConnectionPage extends WizardPage { DefaultDockerConnectionSettingsFinder.DOCKER_HOST)) { tokens = line.split(EQUAL); if (tokens.length == 2) { - String host = tokens[1]; + String host = tokens[1].replaceAll("\"", ""); //$NON-NLS-1$ //$NON-NLS-2$ if (host.startsWith("unix")) { //$NON-NLS-1$ model.setUnixSocketBindingMode(true); model.setUnixSocketPath(host); @@ -511,7 +511,7 @@ public class NewDockerConnectionPage extends WizardPage { DefaultDockerConnectionSettingsFinder.DOCKER_CERT_PATH)) { tokens = line.split(EQUAL); if (tokens.length == 2) { - model.setTcpCertPath(tokens[1]); + model.setTcpCertPath(tokens[1].replaceAll("\"", "")); //$NON-NLS-1$ //$NON-NLS-2$ } } else if (line.startsWith( DefaultDockerConnectionSettingsFinder.DOCKER_TLS_VERIFY)) { @@ -519,7 +519,7 @@ public class NewDockerConnectionPage extends WizardPage { if (tokens.length == 2) { model.setTcpTLSVerify( DefaultDockerConnectionSettingsFinder.DOCKER_TLS_VERIFY_TRUE - .equals(tokens[1])); + .equals(tokens[1].replaceAll("\"", ""))); //$NON-NLS-1$ //$NON-NLS-2$ } } } |