From 92d9b68243c3279548f94d1102cbe48dade5b56b Mon Sep 17 00:00:00 2001 From: blacktop Date: Thu, 9 Jan 2025 16:53:04 -0700 Subject: [PATCH] fix: respect `--quiet` flag when `--symbol` flag is also given in `ipsw dsc disass` cmd --- cmd/ipsw/cmd/dyld/dyld_disass.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cmd/ipsw/cmd/dyld/dyld_disass.go b/cmd/ipsw/cmd/dyld/dyld_disass.go index 23ed96a1f..43660db7b 100644 --- a/cmd/ipsw/cmd/dyld/dyld_disass.go +++ b/cmd/ipsw/cmd/dyld/dyld_disass.go @@ -154,7 +154,7 @@ var DisassCmd = &cobra.Command{ return nil } - if !quiet || len(symbolName) > 0 { + if !quiet && len(symbolName) > 0 { if len(cacheFile) == 0 { cacheFile = dscPath + ".a2s" } @@ -345,9 +345,11 @@ var DisassCmd = &cobra.Command{ } } else { if image, err = f.GetImageContainingVMAddr(startAddr); err == nil { - if err := image.Analyze(); err != nil { - if !viper.GetBool("dyld.disass.force") { - return fmt.Errorf("failed to analyze image %s: %v", filepath.Base(image.Name), err) + if !quiet { + if err := image.Analyze(); err != nil { + if !viper.GetBool("dyld.disass.force") { + return fmt.Errorf("failed to analyze image %s: %v", filepath.Base(image.Name), err) + } } } m, err := image.GetMacho()