History

Fix go installation check on amazon instance

Harshavardhana committed 11 years ago

Commit 75788c71 parent 46ab20d2 files · +8 −2Browse files

Unified · Split

2 files
  1. buildscripts/checkdeps.sh +6 −1
  2. pkg/utils/scsi/scsi.go +2 −1
buildscripts/checkdeps.sh+6−1
@@ -104,7 +104,12 @@ check_golang_env() { · 103 unmodified lines
104104 exit -1
105105 fi
106106
107− if [ "$(dirname ${go_binary_path})" != "${GOROOT%%*(/)}/bin" ] ; then
107+ local new_go_binary_path=${go_binary_path}
108+ if [ -h "${go_binary_path}" ]; then
109+ new_go_binary_path=$(/bin/readlink -f ${go_binary_path})
110+ fi
111+
112+ if [[ !"$(dirname ${new_go_binary_path})" =~ *"${GOROOT%%*(/)}"* ]] ; then
108113 echo "The go binary found in your PATH configuration does not belong to the Go installation pointed by your GOROOT environment," \
109114 "please refer to Go installation document"
110115 echo "https://github.com/minio/minio/blob/master/INSTALLGO.md#install-go-13"
pkg/utils/scsi/scsi.go+2−1
@@ -52,7 +52,8 @@ func GetDisks() (Disks, error) { · 51 unmodified lines
5252
5353 sysFiles, err := ioutil.ReadDir(sysFSDEVICES)
5454 if err != nil {
55− return Disks{}, iodine.New(err, nil)
55+ // may be an amazon instance, ignore this
56+ return Disks{}, nil
5657 }
5758
5859 scsidevices = filterdisks(sysFiles)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t