mirror of
https://github.com/golang/go
synced 2024-11-18 16:04:44 -07:00
go/build: undo CL 7129048
This broke 'godoc net/http'. TBR=adg CC=golang-dev https://golang.org/cl/7235052
This commit is contained in:
parent
2cd5b01454
commit
a8e0a75726
@ -322,7 +322,9 @@ func (p *Package) IsCommand() bool {
|
||||
// the named directory.
|
||||
func (ctxt *Context) ImportDir(dir string, mode ImportMode) (*Package, error) {
|
||||
p, err := ctxt.Import(".", dir, mode)
|
||||
if err == nil && !ctxt.isDir(p.Dir) {
|
||||
// TODO(rsc,adg): breaks godoc net/http. Not sure why.
|
||||
// See CL 7232047 and issue 4696.
|
||||
if false && err == nil && !ctxt.isDir(p.Dir) {
|
||||
err = fmt.Errorf("%q is not a directory", p.Dir)
|
||||
}
|
||||
return p, err
|
||||
|
@ -92,6 +92,7 @@ func TestLocalDirectory(t *testing.T) {
|
||||
|
||||
// golang.org/issue/3248
|
||||
func TestBogusDirectory(t *testing.T) {
|
||||
return // See issue 4696.
|
||||
const dir = "/foo/bar/baz/gopher"
|
||||
_, err := ImportDir(dir, FindOnly)
|
||||
want := fmt.Sprintf("%q is not a directory", filepath.FromSlash(dir))
|
||||
|
Loading…
Reference in New Issue
Block a user