Skip to content
Myr

cmd: Make detailed error when project not in $GOPATH

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Updates #448

authored by Albert Nigmatzianov · committed by Albert Nigmatzianov · parent 51b7cf5 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:cobra/cmd/project.go+1 added-1 removed
88 unmodified lines
89// trimSrcPath trims at the beginning of absPath the srcPath.90func trimSrcPath(absPath, srcPath string) string {91 relPath, err := filepath.Rel(srcPath, absPath)92 if err != nil {93 er("Cobra supports project only within $GOPATH")93 er("Cobra supports project only within $GOPATH: " + err.Error())94 }95 return relPath96}97
85 unmodified lines