mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-22 09:57:15 +01:00
command-line options override environment variables, and not the other way around
This commit is contained in:
parent
0cc696faa3
commit
12b1212f4d
@ -7,6 +7,8 @@ NEW IN WAF 1.8.0
|
||||
* LaTeX multibib #1345
|
||||
* Various improvements in the Python detection and processing
|
||||
* Rst document processing
|
||||
* Console handling improvements
|
||||
* Properly-sized progress bar on windows
|
||||
|
||||
NEW IN WAF 1.7.11
|
||||
-----------------
|
||||
|
@ -40,8 +40,6 @@ colors_lst = {
|
||||
|
||||
def enable_colors(use):
|
||||
if use == 1:
|
||||
if os.environ.get('NOCOLOR', ''):
|
||||
use = 0
|
||||
if not (sys.stderr.isatty() or sys.stdout.isatty()):
|
||||
use = 0
|
||||
if Utils.is_win32:
|
||||
|
@ -51,7 +51,8 @@ class opt_parser(optparse.OptionParser):
|
||||
self.ctx = ctx
|
||||
|
||||
jobs = ctx.jobs()
|
||||
p('-c', '--color', dest='colors', default='auto', action='store', help='whether to use colors (yes/no/auto) [default: auto]', choices=('yes', 'no', 'auto'))
|
||||
color = os.environ.get('NOCOLOR', '') and 'no' or 'auto'
|
||||
p('-c', '--color', dest='colors', default=color, action='store', help='whether to use colors (yes/no/auto) [default: auto]', choices=('yes', 'no', 'auto'))
|
||||
p('-j', '--jobs', dest='jobs', default=jobs, type='int', help='amount of parallel jobs (%r)' % jobs)
|
||||
p('-k', '--keep', dest='keep', default=0, action='count', help='keep running happily even if errors are found')
|
||||
p('-v', '--verbose', dest='verbose', default=0, action='count', help='verbosity level -v -vv or -vvv [default: 0]')
|
||||
|
Loading…
Reference in New Issue
Block a user