Commit f7b9ac76 authored by Tarmigan Casebolt's avatar Tarmigan Casebolt Committed by Andrew Gerrand

goinstall: error out with paths that end with '/'

R=adg, rsc, tarmigan+golang
CC=golang-dev
https://golang.org/cl/4807048
parent d1a3edae
...@@ -182,6 +182,12 @@ func install(pkg, parent string) { ...@@ -182,6 +182,12 @@ func install(pkg, parent string) {
visit[pkg] = done visit[pkg] = done
}() }()
// Don't allow trailing '/'
if _, f := filepath.Split(pkg); f == "" {
errorf("%s should not have trailing '/'\n", pkg)
return
}
// Check whether package is local or remote. // Check whether package is local or remote.
// If remote, download or update it. // If remote, download or update it.
tree, pkg, err := build.FindTree(pkg) tree, pkg, err := build.FindTree(pkg)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment