mirror of
https://github.com/golang/go
synced 2024-11-22 08:54:39 -07:00
goinstall: warn when http:// is found at beginning of package name
Fixes #860. R=golang-dev, adg1, rsc, adg CC=golang-dev https://golang.org/cl/2124046
This commit is contained in:
parent
3e8cc7f114
commit
25c8d4e932
@ -148,6 +148,11 @@ func install(pkg, parent string) {
|
|||||||
// If remote, download or update it.
|
// If remote, download or update it.
|
||||||
var dir string
|
var dir string
|
||||||
local := false
|
local := false
|
||||||
|
if strings.HasPrefix(pkg, "http://") {
|
||||||
|
fmt.Fprintf(os.Stderr, "%s: %s: 'http://' used in remote path, try '%s'\n", argv0, pkg, pkg[7:])
|
||||||
|
errors = true
|
||||||
|
return
|
||||||
|
}
|
||||||
if isLocalPath(pkg) {
|
if isLocalPath(pkg) {
|
||||||
dir = pkg
|
dir = pkg
|
||||||
local = true
|
local = true
|
||||||
|
Loading…
Reference in New Issue
Block a user