From 26500d670dbd086867c0ad4672cb557ba7ca3f41 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Thu, 29 Aug 2024 18:29:46 +0300 Subject: [PATCH] 'bpm info' will now exit with exit code 1 when package can't be found --- main.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/main.go b/main.go index 9ba2c99..3e588c5 100644 --- a/main.go +++ b/main.go @@ -96,21 +96,17 @@ func resolveCommand() { if _, err := os.Stat(pkg); err == nil && !showInstalled { info, err = utils.ReadPackage(pkg) if err != nil { - fmt.Printf("File (%s) could not be read\n", pkg) - continue + log.Fatalf("File (%s) could not be read\n", pkg) } - } else if showInstalled { info = utils.GetPackageInfo(pkg, rootDir, false) if info == nil { - fmt.Printf("Package (%s) is not installed\n", pkg) - continue + log.Fatalf("Package (%s) is not installed\n", pkg) } } else { entry, _, err := utils.GetRepositoryEntry(pkg) if err != nil { - fmt.Printf("Package (%s) could not be found in any repository\n", pkg) - continue + log.Fatalf("Package (%s) could not be found in any repository\n", pkg) } info = entry.Info }