color=0 for json and csv formats to avoid escape characters in a report

This commit is contained in:
AlGreed 2016-12-14 12:09:23 +01:00
parent 98d7d25aa1
commit 520966f776

View File

@ -10830,18 +10830,22 @@ parse_cmd_line() {
do_logging=true do_logging=true
;; ;;
--json) --json)
COLOR=0
do_json=true do_json=true
;; # DEFINITION of JSONFILE is not arg specified: automagically in parse_hn_port() ;; # DEFINITION of JSONFILE is not arg specified: automagically in parse_hn_port()
# following does the same but we can specify a log location additionally # following does the same but we can specify a log location additionally
--jsonfile|--jsonfile=*) --jsonfile|--jsonfile=*)
COLOR=0
JSONFILE=$(parse_opt_equal_sign "$1" "$2") JSONFILE=$(parse_opt_equal_sign "$1" "$2")
[[ $? -eq 0 ]] && shift [[ $? -eq 0 ]] && shift
do_json=true do_json=true
;; ;;
--json-pretty) --json-pretty)
COLOR=0
do_pretty_json=true do_pretty_json=true
;; ;;
--jsonfile-pretty|--jsonfile-pretty=*) --jsonfile-pretty|--jsonfile-pretty=*)
COLOR=0
JSONFILE=$(parse_opt_equal_sign "$1" "$2") JSONFILE=$(parse_opt_equal_sign "$1" "$2")
[[ $? -eq 0 ]] && shift [[ $? -eq 0 ]] && shift
do_pretty_json=true do_pretty_json=true
@ -10854,10 +10858,12 @@ parse_cmd_line() {
GIVE_HINTS=true GIVE_HINTS=true
;; ;;
--csv) --csv)
COLOR=0
do_csv=true do_csv=true
;; # DEFINITION of CSVFILE is not arg specified: automagically in parse_hn_port() ;; # DEFINITION of CSVFILE is not arg specified: automagically in parse_hn_port()
# following does the same but we can specify a log location additionally # following does the same but we can specify a log location additionally
--csvfile|--csvfile=*) --csvfile|--csvfile=*)
COLOR=0
CSVFILE=$(parse_opt_equal_sign "$1" "$2") CSVFILE=$(parse_opt_equal_sign "$1" "$2")
[[ $? -eq 0 ]] && shift [[ $? -eq 0 ]] && shift
do_csv=true do_csv=true