Fossil

Check-in [fbfa6daeca]
Login

Check-in [fbfa6daeca]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix a logic error in processing of the NO_COLOR environment variable.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | standard-cli-colors
Files: files | file ages | folders
SHA3-256: fbfa6daeca9be898853f4f97bf34653a2403d1486d2c1e5c44e0fe3825d9dd4a
User & Date: florian 2025-04-25 16:19:00.000
Context
2025-04-25
16:22
Optimized validation of the FOSSIL_COLOR environment variable. ... (check-in: c5f1e0daea user: florian tags: standard-cli-colors)
16:19
Fix a logic error in processing of the NO_COLOR environment variable. ... (check-in: fbfa6daeca user: florian tags: standard-cli-colors)
16:18
Sync with trunk. ... (check-in: 855076ce79 user: florian tags: standard-cli-colors)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/main.c.
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
    }else{
      fossil_fatal("the --color option must be 'never', 'always', or 'auto'");
    }
  }
  if( g.colorOutput==COLOR_VT_UNSET ){
    zEnvVar = fossil_getenv("NO_COLOR");
    if( zEnvVar ){
      if( is_false(zEnvVar) ){
        g.colorOutput = COLOR_VT_NEVER;
      }
      fossil_path_free(zEnvVar);
    }
  }
  g.cliColor = "\033[91m";
  zEnvVar = fossil_getenv("FOSSIL_COLOR");







|







678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
    }else{
      fossil_fatal("the --color option must be 'never', 'always', or 'auto'");
    }
  }
  if( g.colorOutput==COLOR_VT_UNSET ){
    zEnvVar = fossil_getenv("NO_COLOR");
    if( zEnvVar ){
      if( !is_false(zEnvVar) ){
        g.colorOutput = COLOR_VT_NEVER;
      }
      fossil_path_free(zEnvVar);
    }
  }
  g.cliColor = "\033[91m";
  zEnvVar = fossil_getenv("FOSSIL_COLOR");