[GRADLE-2501] installApp generated shell script is too verbose when performing internal cd Created: 28/Sep/12 Updated: 04/Jan/13 Resolved: 01/Nov/12
If the environment variable CDPATH is set any call to the bash internal "cd" will print the new path to standard out if the argument was called with a relative path (to make the user aware of the final directory where he has "cded" to).
This is the case for the generated shell script from the installApp plugin. When calling the generated script by, e.g. "build/install/xxxtool/bin/xxxtool" the first thing it does, is printing something like "/Users/ascheman/wrk/xxxtool/build/install/xxxtool" which is not expected by the user.
This can be fixed by changing the following line in the generated shell script
cd "`dirname \"$PRG\"`/.."
cd "`dirname \"$PRG\"`/.." >&-
to make it print the message to /dev/null.
(This is a common error which can be seen in a lot of bash scripts since only few people are aware of the "cd" command behaviour when the convenience variable CDPATH is set).
|Comment by Gerd Aschemann [ 28/Sep/12 ]|
Here is a patch to fix the problem ...