Skip to content

Commit

Permalink
fix: respect --quiet flag when --symbol flag is also given in `ip…
Browse files Browse the repository at this point in the history
…sw dsc disass` cmd
  • Loading branch information
blacktop committed Jan 9, 2025
1 parent de2f71b commit 92d9b68
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cmd/ipsw/cmd/dyld/dyld_disass.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 92d9b68

Please sign in to comment.