Skip to content

Commit

Permalink
Merge pull request #43 from KES777/feature/43_option_host_has_no_effect
Browse files Browse the repository at this point in the history
FIXED: when supply '--host auto' on command line it does not work
  • Loading branch information
aurora committed Sep 14, 2015
2 parents 9198633 + e7b28ea commit 9e0bde3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions rmate
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ done
host="${RMATE_HOST:-$host}"
port="${RMATE_PORT:-$port}"

if [[ "$host" = "auto" && "$SSH_CONNECTION" != "" ]]; then
host=${SSH_CONNECTION%% *}
fi

# misc initialization
filepath=""
Expand Down Expand Up @@ -201,6 +198,11 @@ while test "${1:0:1}" = "-"; do
shift
done

if [[ "$host" = "auto" && "$SSH_CONNECTION" != "" ]]; then
host=${SSH_CONNECTION%% *}
fi


filepath="$1"

if [ "$filepath" = "" ]; then
Expand Down

0 comments on commit 9e0bde3

Please sign in to comment.