[
https://issues.jboss.org/browse/JBIDE-23862?page=com.atlassian.jira.plugi...
]
Andre Dietisheim edited comment on JBIDE-23862 at 5/22/17 4:39 PM:
-------------------------------------------------------------------
[~dbocharov] finally found the solution in PR
[#272|https://github.com/openshift/openshift-restclient-java/pull/272]. For mac the full
path to the binary has to be given as argument while for linux/windows the binary name is
used as argument and the builder directory set:
{code}
+ if (IS_MAC) {
+ args.add(location);
+ Arrays.stream(StringUtils.split(buildArgs(Arrays.asList(options)))).forEach(s ->
args.add(s));
+ builder = new ProcessBuilder(args);
+ } else {
+ File oc = new File(location);
+ args.add(oc.getName());
+ Arrays.stream(StringUtils.split(buildArgs(Arrays.asList(options)))).forEach(s ->
args.add(s));
+ builder = new ProcessBuilder(args);
+ builder.directory(oc.getParentFile());
+ }
{code}
was (Author: adietish):
[~dbocharov] finally found the solution. For mac the full path to the binary has to be
given as argument while for linux/windows the binary name is used as argument and the
builder directory set:
{code}
+ if (IS_MAC) {
+ args.add(location);
+ Arrays.stream(StringUtils.split(buildArgs(Arrays.asList(options)))).forEach(s ->
args.add(s));
+ builder = new ProcessBuilder(args);
+ } else {
+ File oc = new File(location);
+ args.add(oc.getName());
+ Arrays.stream(StringUtils.split(buildArgs(Arrays.asList(options)))).forEach(s ->
args.add(s));
+ builder = new ProcessBuilder(args);
+ builder.directory(oc.getParentFile());
+ }
{code}
Server adapter: if "oc" in preferences is set to path with
a " " syncing fails
------------------------------------------------------------------------------
Key: JBIDE-23862
URL:
https://issues.jboss.org/browse/JBIDE-23862
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: openshift
Affects Versions: 4.4.3.Final
Reporter: Andre Dietisheim
Assignee: Dmitrii Bocharov
Labels: oc_binary, openshift_v3
Fix For: 4.5.0.AM1
Attachments: ProcessMain.java
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)