Merge pull request #1657 from vadmeste/fix_realpath_behavior

realpath() alternative implementation doesn't really work under linux and freebsd, use a simpler and more portable method
This commit is contained in:
Harshavardhana
2016-04-01 13:27:14 -07:00
+1 -6
View File
@@ -15,18 +15,13 @@
# limitations under the License.
#
## use a portable implementation here `realpath` doesn't exist on Darwin/OS X.
realpath() {
[[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
}
_init() {
shopt -s extglob
# Fetch real paths instead of symlinks before comparing them
PWD=$(env pwd -P)
GOPATH=$(realpath $(go env GOPATH))
GOPATH=$(cd "$(go env GOPATH)" ; env pwd -P)
}
main() {