Skip to content

cmd/go: emit better error message on improper use go "go install" #6191

Closed
@gopherbot

Description

@gopherbot

by dean.w.schulze:

go version go1.1.2 windows/amd64
(Also happens in go version go1.1 windows/amd64)

GOPATH (Cygwin):
c:\dean\golang\go3p:c:\dean\courses\algorithms-stanford\design.and.analysis.of.algorithms.1\programming-questions\common\code\golang

The file algoutils.go is in the directory 

c:\dean\courses\algorithms-stanford\design.and.analysis.of.algorithms.1\programming-questions\common\code\golang\src\algoutils

From that directory run

    go install algoutils.go

go install: no install location for directory
C:\dean\courses\algorithms-stanford\design.and.analysis.of.algorithms.1\programming-questions\common\code\golang\src\algoutils
outside GOPATH

I get the same error if I run from Cygwin or if I run from DOS.  The DOS GOPATH is

GOPATH=c:\dean\golang\go3p;c:\dean\courses\algorithms-stanford\design.and.analysis.of.algorithms.1\programming-questions\common\code\golang

In both cases (DOS and Cygwin) the command "go install algoutils" works.  It's
just an issue of the algoutils.go file is given as the input.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions