pongasoft / glu

Deployment Automation Platform
Apache License 2.0
518 stars 99 forks source link

handle unexpected output while setting JAVA_TOOL_OPTIONS enviroment variable #268

Closed adyliu closed 10 years ago

adyliu commented 10 years ago

I set the variable of JAVA_TOOL_OPTIONS on OS X, so the bash failed with the unexpected output: Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

ypujante commented 10 years ago

Can you give an example of a command line that make it fail?

adyliu commented 10 years ago

When I start the tutorial.sh

➜ ~/Downloads/glu $ bin/tutorial.sh start
bin/tutorial.sh: line 178: [: Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8: integer expression expected

I set an enviroment variable in the bash profile:

➜ ~/Downloads/glu $ grep JAVA_TOOL_OPTIONS /etc/bashrc
export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8
ypujante commented 10 years ago

Thank you. I will try to reproduce.

ypujante commented 10 years ago

I see what is happening. I guess on my system it does not fail (I do not get the integer expression expected error message), but I can see that the sed command returns the wrong value.

ypujante commented 10 years ago

Applied in 5.5.2. Thanks!