[jbosstools-issues] [JBoss JIRA] (JBIDE-21428) Server adapter: cannot publish, cannot find "oc" executable
Viacheslav Kabanovich (JIRA)
issues at jboss.org
Fri Jan 8 13:42:00 EST 2016
[ https://issues.jboss.org/browse/JBIDE-21428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13146619#comment-13146619 ]
Viacheslav Kabanovich commented on JBIDE-21428:
-----------------------------------------------
It seems I see what is the matter.
OpenShiftCorePreferences.INSTANCE.getOCBinaryLocation() looks only into InstanceScope, but initializer puts default value into DefaultScope.
Initializer is called at each Eclipse start, so default preference has actual value from $PATH (unless user changes $PATH while Eclipse is open), and anyway default value never finds its way to InstanceScope.
If logic of server adapter getting oc binary path should be as you described, then OpenShiftCorePreferences.INSTANCE.getOCBinaryLocation() may look like this
{code}
public String getOCBinaryLocation() {
String result = ocBinaryLocation.get();
if(StringUtils.isEmpty(result)) {
result = OCBinaryName.getInstance().getLocation();
}
return result;
}
{code}
[~adietish], do you think it may solve the problem?
> Server adapter: cannot publish, cannot find "oc" executable
> -----------------------------------------------------------
>
> Key: JBIDE-21428
> URL: https://issues.jboss.org/browse/JBIDE-21428
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: openshift
> Affects Versions: 4.3.1.Beta1
> Reporter: Andre Dietisheim
> Assignee: Andre Dietisheim
> Priority: Blocker
> Fix For: 4.3.1.Beta2
>
> Attachments: could-not-sync-error.png, oc-binary-preferences.png
>
>
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jbosstools-issues
mailing list