@@ -33,6 +33,7 @@ import (
3333 "github.com/alecthomas/chroma/v2/styles"
3434 "github.com/apex/log"
3535 "github.com/blacktop/ipsw/internal/ai"
36+ "github.com/blacktop/ipsw/internal/colors"
3637 dcmd "github.com/blacktop/ipsw/internal/commands/disass"
3738 "github.com/blacktop/ipsw/pkg/disass"
3839 "github.com/blacktop/ipsw/pkg/dyld"
@@ -239,7 +240,7 @@ var DisassCmd = &cobra.Command{
239240 AsJSON : asJSON ,
240241 Demangle : demangleFlag ,
241242 Quiet : quiet ,
242- Color : viper . GetBool ( "color" ) && ! viper . GetBool ( "no-color" ) && ! decompile ,
243+ Color : colors . Active () ,
243244 })
244245
245246 if ! quiet {
@@ -289,7 +290,7 @@ var DisassCmd = &cobra.Command{
289290 Stream : false ,
290291 DisableCache : viper .GetBool ("dyld.disass.dec-nocache" ),
291292 Verbose : viper .GetBool ("verbose" ),
292- Color : viper . GetBool ( "color" ) && ! viper . GetBool ( "no-color" ),
293+ Color : colors . Active ( ),
293294 Theme : viper .GetString ("dyld.disass.dec-theme" ),
294295 MaxRetries : viper .GetInt ("dyld.disass.dec-retries" ),
295296 RetryBackoff : viper .GetDuration ("dyld.disass.dec-retry-backoff" ),
@@ -356,7 +357,7 @@ var DisassCmd = &cobra.Command{
356357 AsJSON : asJSON ,
357358 Demangle : demangleFlag ,
358359 Quiet : quiet ,
359- Color : viper . GetBool ( "color" ) && ! viper . GetBool ( "no-color" ) && ! decompile ,
360+ Color : colors . Active ( ) && ! decompile ,
360361 })
361362
362363 if ! quiet {
@@ -411,7 +412,7 @@ var DisassCmd = &cobra.Command{
411412 Stream : false ,
412413 DisableCache : viper .GetBool ("dyld.disass.dec-nocache" ),
413414 Verbose : viper .GetBool ("verbose" ),
414- Color : viper . GetBool ( "color" ) && ! viper . GetBool ( "no-color" ),
415+ Color : colors . Active ( ),
415416 Theme : viper .GetString ("dyld.disass.dec-theme" ),
416417 MaxRetries : viper .GetInt ("dyld.disass.dec-retries" ),
417418 RetryBackoff : viper .GetDuration ("dyld.disass.dec-retry-backoff" ),
@@ -504,7 +505,7 @@ var DisassCmd = &cobra.Command{
504505 AsJSON : asJSON ,
505506 Demangle : demangleFlag ,
506507 Quiet : quiet ,
507- Color : viper . GetBool ( "color" ) && ! viper . GetBool ( "no-color" ) && ! decompile ,
508+ Color : colors . Active ( ) && ! decompile ,
508509 })
509510
510511 if ! quiet {
@@ -550,7 +551,7 @@ var DisassCmd = &cobra.Command{
550551 Stream : false ,
551552 DisableCache : viper .GetBool ("dyld.disass.dec-nocache" ),
552553 Verbose : viper .GetBool ("verbose" ),
553- Color : viper . GetBool ( "color" ) && ! viper . GetBool ( "no-color" ),
554+ Color : colors . Active ( ),
554555 Theme : viper .GetString ("dyld.disass.dec-theme" ),
555556 MaxRetries : viper .GetInt ("dyld.disass.dec-retries" ),
556557 RetryBackoff : viper .GetDuration ("dyld.disass.dec-retry-backoff" ),
0 commit comments