cmd/hopp-generate: Pass the actual directory into scroungeForPackageName

This commit is contained in:
Sasha Koshka 2025-10-16 22:10:09 -04:00
parent 207627c428
commit 75810bfda1

View File

@ -37,7 +37,7 @@ func main() {
absDestination, err := filepath.Abs(destination) absDestination, err := filepath.Abs(destination)
handleErr(command, 1, err) handleErr(command, 1, err)
base := filepath.Base(absDestination) base := filepath.Base(absDestination)
if scrounged, ok := scroungeForPackageName(base); ok { if scrounged, ok := scroungeForPackageName(filepath.Dir(absDestination)); ok {
packageName = scrounged packageName = scrounged
} else { } else {
packageName = strings.ReplaceAll( packageName = strings.ReplaceAll(