Show repo name when prompting to select package

This commit is contained in:
Arsen Musayelyan 2022-11-14 14:04:46 -08:00
parent 8f95ff4676
commit d32437e8b2
1 changed files with 3 additions and 1 deletions

View File

@ -146,7 +146,9 @@ func findPkg(pkg string) ([]string, error) {
func pkgPrompt(options []string) ([]string, error) {
names := make([]string, len(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{