Skip to content
Myr

Fix bug where project name isn't properly detected

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

authored by spf13 · committed by spf13 · parent 2456266 · Browse files · 1 file+1 added−2 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−2 removed

  • other:+1 added−2 removed

1 file+1 added−2 removed

modified:cobra/cmd/helpers.go+1 added-2 removed
110 unmodified lines
111 return os.Getenv("GOPATH") + string(os.PathSeparator) + "src" + string(os.PathSeparator)112}113114func projectName() string {115 pp := ProjectPath()116 return filepath.Dir(pp)115 return filepath.Base(ProjectPath())116}117118func guessProjectPath() {119 // if no path is provided... assume CWD.
223 unmodified lines