Show repo name when prompting to select package
This commit is contained in:
parent
004358050c
commit
9298cf800f
4
repo.go
4
repo.go
@ -146,7 +146,9 @@ func findPkg(pkg string) ([]string, error) {
|
|||||||
func pkgPrompt(options []string) ([]string, error) {
|
func pkgPrompt(options []string) ([]string, error) {
|
||||||
names := make([]string, len(options))
|
names := make([]string, len(options))
|
||||||
for i, option := range options {
|
for i, option := range options {
|
||||||
names[i] = filepath.Base(filepath.Dir(option))
|
pkgDir := filepath.Dir(option)
|
||||||
|
repoDir := filepath.Dir(pkgDir)
|
||||||
|
names[i] = filepath.Base(repoDir) + "/" + filepath.Base(pkgDir)
|
||||||
}
|
}
|
||||||
|
|
||||||
prompt := &survey.MultiSelect{
|
prompt := &survey.MultiSelect{
|
||||||
|
Loading…
Reference in New Issue
Block a user