mirror of
https://github.com/golang/go
synced 2024-11-22 04:34:39 -07:00
dashboard: look for key in $GOROOT before $HOME
TBR=agl1 CC=golang-dev https://golang.org/cl/195076
This commit is contained in:
parent
b81065d07f
commit
c40c974d33
@ -34,10 +34,13 @@ def main(args):
|
|||||||
else:
|
else:
|
||||||
buildport = int(os.environ['BUILDPORT'])
|
buildport = int(os.environ['BUILDPORT'])
|
||||||
|
|
||||||
|
try:
|
||||||
|
buildkey = file('%s/.gobuildkey' % os.environ['GOROOT'], 'r').read().strip()
|
||||||
|
except IOError:
|
||||||
try:
|
try:
|
||||||
buildkey = file('%s/.gobuildkey' % os.environ['HOME'], 'r').read().strip()
|
buildkey = file('%s/.gobuildkey' % os.environ['HOME'], 'r').read().strip()
|
||||||
except IOError:
|
except IOError:
|
||||||
print >>sys.stderr, "Need key in ~/.gobuildkey"
|
print >>sys.stderr, "Need key in $GOROOT/.gobuildkey or ~/.gobuildkey"
|
||||||
return
|
return
|
||||||
|
|
||||||
if args[1] == 'init':
|
if args[1] == 'init':
|
||||||
|
Loading…
Reference in New Issue
Block a user