Show repo name when prompting to select package
This commit is contained in:
parent
8f95ff4676
commit
d32437e8b2
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