Github user mxm commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2149#discussion_r71355731
  
    --- Diff: flink-dist/src/main/flink-bin/bin/flink ---
    @@ -17,21 +17,39 @@
     # limitations under the License.
     
################################################################################
     
    -target="$0"
     # For the case, the executable has been directly symlinked, figure out
     # the correct bin path by following its symlink up to an upper bound.
     # Note: we can't use the readlink utility here if we want to be POSIX
     # compatible.
    -iteration=0
    -while [ -L "$target" ]; do
    -    if [ "$iteration" -gt 100 ]; then
    -        echo "Cannot resolve path: You have a cyclic symlink in $target."
    -        break
    +followSymLink() {
    +    local iteration=0
    +    local target=$1
    +    while [ -L "$target" ]; do
    +        if [ "$iteration" -gt 100 ]; then
    +            echo "Cannot resolve path: You have a cyclic symlink in 
$target."
    +            break
    +        fi
    +        ls=`ls -ld -- "$target"`
    +        target=`expr "$ls" : '.* -> \(.*\)$'`
    +        iteration=$((iteration + 1))
    +    done
    +
    +    echo "$target"
    +}
    +
    +target=$(followSymLink "$0")
    +
    +#Check if --configDir is present and set is value as FLINK_CONF_DIR
    +if [ "$1" = "--configDir" ]; then
    --- End diff --
    
    Here you assume that `--configDir` is the first parameter but later on you 
parse for it until you find the action command. Why do you set both the 
environment variable and pass it on as a parameter?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to