[jbosstools-issues] [JBoss JIRA] (JBIDE-24881) Strange strings in cdk's PATH environmental variable

Martin Malina (JIRA) issues at jboss.org
Thu Aug 24 05:11:00 EDT 2017


    [ https://issues.jboss.org/browse/JBIDE-24881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13453494#comment-13453494 ] 

Martin Malina edited comment on JBIDE-24881 at 8/24/17 5:10 AM:
----------------------------------------------------------------

I can reproduce when running devstudio from console:
1. Start devstudio from console, e.g. ./devstudio-11.1.0.AM1-867/studio/devstudio.app/Contents/MacOS/devstudio 
2. When starting, choose a new workspace
3. Assuming you have something in ~/.minishift, the cdk 3 server adapter will get created
4. Open the server editor and set up your minishift binary, save
5. Open launch config's environment tab - you will see this broken PATH entry


was (Author: mmalina):
It turns out I can reproduce... But only with my bash minishift wrapper which is not really a valid use case.
That's how I got into this issue yesterday also.
When I first launch devstudio, it usually contains a detected cdk 3 server. But this server adapter doesn't have the minishift binary set up (because it's not on the PATH). So there is no PATH setup in the launch config either. Once I set up the minishift binary in the server editor, the PATH is added and set in the launch config. This works fine for me with normal minishift. But if I use my minishift wrapper it then includes this "Restored session..." BS.
{code}
#!/bin/bash

case $* in
"openshift registry")
	echo bla bla
	exit 1
	;;
*)
	/Users/rasp/jbossqa/cdk/cdk-3.1.0/minishift $*
esac
{code}
The PATH:
{code}
Restored session: Thu Aug 24 10:45:32 CEST 2017
/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin/bin
Saving session...
...saving history...
...completed.:/Users/rasp/jbossqa/cdk/cdk-3.1.0-wrapper
{code}

Sure, this is not really a valid use case. But Ondrej says he is able to reproduce with real minishift when he runs devstudio from Terminal directly. So I'm working to get there and to have a clean and clear reproducer.

> Strange strings in cdk's PATH environmental variable
> ----------------------------------------------------
>
>                 Key: JBIDE-24881
>                 URL: https://issues.jboss.org/browse/JBIDE-24881
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: cdk
>    Affects Versions: 4.5.1.AM1
>            Reporter: Martin Malina
>            Assignee: Rob Stryker
>             Fix For: 4.5.1.AM2
>
>
> Hardy was trying to test cdk in eclipse and got an error when starting cdk:
> {code}
> org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 67; Character reference "&#7" is an invalid XML character. occurred while reading launch configuration file: /Volumes/Gram/Hardy/tmp/workspace/.metadata/.plugins/org.eclipse.debug.core/.launches/Container Development Environment 3.launch.
> Character reference "&#7" is an invalid XML character.
> {code}
> It turns out that his PATH env var for cdk is this (from JBIDE-24222):
> {code}
> ]1337;RemoteHost=hardy at nineveh.lan]1337;CurrentDir=/Volumes/Gram/Hardy/tmp/devstudio/studio/devstudio.app/Contents/MacOS]1337;ShellIntegrationVersion=3;shell=bash/opt/local/bin:/opt/local/sbin:/Users/hardy/.rvm/gems/ruby-2.0.0-p648/bin:/Users/hardy/.rvm/gems/ruby-2.0.0-p648 at global/bin:/Users/hardy/.rvm/rubies/ruby-2.0.0-p648/bin:/opt/local/bin:/opt/local/sbin:/Users/hardy/work/developer-platform/openshift/oc/1.3.1:/opt/java/wildfly/bin:/opt/java/tomcat/bin:/opt/java/ant/bin:/opt/java/maven/bin:/opt/java/scala/bin:/opt/java/gradle/bin:/bin:/Applications/Development/Vagrant/bin:/Users/hardy/work/developer-platform/cdk-3/go/bin:/opt/local/bin:/opt/local/sbin:/Users/hardy/bin:/opt/openshift:/opt/local/lib/mariadb/bin:/Applications/Internet/Firefox.app/Contents/MacOS:/Applications/Dev/Editor/Sublime Text.app/Contents/SharedSupport/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Applications/Wireshark.app/Contents/MacOS:/Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/bin/:/opt/local/bin:/opt/local/sbin:/Users/hardy/.rvm/gems/ruby-2.0.0-p648/bin:/Users/hardy/.rvm/gems/ruby-2.0.0-p648 at global/bin:/Users/hardy/.rvm/rubies/ruby-2.0.0-p648/bin:/Users/hardy/work/developer-platform/openshift/oc/1.3.1:/opt/java/wildfly/bin:/opt/java/tomcat/bin:/opt/java/ant/bin:/opt/java/maven/bin:/opt/java/scala/bin:/opt/java/gradle/bin:/Applications/Development/Vagrant/bin:/Users/hardy/work/developer-platform/cdk-3/go/bin:/Users/hardy/bin:/opt/openshift:/opt/local/lib/mariadb/bin:/Applications/Internet/Firefox.app/Contents/MacOS:/Applications/Dev/Editor/Sublime Text.app/Contents/SharedSupport/bin:/Users/hardy/.rvm/bin:/Users/hardy/.rvm/bin
> {code}
> This was in devstudio nightly. So I checked too and I have a similar problem. In my case I have this in the PATH variable in launch config:
> {code}
> Restored session: Tue Aug 22 15:34:26 CEST 2017
> /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin/bin
> Saving session...
> ...saving history...
> ...completed.:/Users/rasp/jbossqa/cdk/cdk-3.1.0
> {code}
> So something in the way you get the PATH is wrong. I would say this is definitely a regression - I remember seeing correct PATH there in the past.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)



More information about the jbosstools-issues mailing list