Add repository functionality to BPM #4
10
main.go
10
main.go
@ -96,21 +96,17 @@ func resolveCommand() {
|
|||||||
if _, err := os.Stat(pkg); err == nil && !showInstalled {
|
if _, err := os.Stat(pkg); err == nil && !showInstalled {
|
||||||
info, err = utils.ReadPackage(pkg)
|
info, err = utils.ReadPackage(pkg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("File (%s) could not be read\n", pkg)
|
log.Fatalf("File (%s) could not be read\n", pkg)
|
||||||
continue
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if showInstalled {
|
} else if showInstalled {
|
||||||
info = utils.GetPackageInfo(pkg, rootDir, false)
|
info = utils.GetPackageInfo(pkg, rootDir, false)
|
||||||
if info == nil {
|
if info == nil {
|
||||||
fmt.Printf("Package (%s) is not installed\n", pkg)
|
log.Fatalf("Package (%s) is not installed\n", pkg)
|
||||||
continue
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
entry, _, err := utils.GetRepositoryEntry(pkg)
|
entry, _, err := utils.GetRepositoryEntry(pkg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("Package (%s) could not be found in any repository\n", pkg)
|
log.Fatalf("Package (%s) could not be found in any repository\n", pkg)
|
||||||
continue
|
|
||||||
}
|
}
|
||||||
info = entry.Info
|
info = entry.Info
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user