mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-01 06:19:44 +01:00
Specify an error code in all calls to fatal()
This commit fix a few places in which calls to fatal() do not specify an error code.
This commit is contained in:
parent
17ad3d70a4
commit
265c85a44f
10
testssl.sh
10
testssl.sh
@ -1335,7 +1335,7 @@ json_header() {
|
|||||||
local filename_provided=false
|
local filename_provided=false
|
||||||
|
|
||||||
if [[ -n "$PARENT_JSONFILE" ]]; then
|
if [[ -n "$PARENT_JSONFILE" ]]; then
|
||||||
[[ -n "$JSONFILE" ]] && fatal "Can't write to both $PARENT_JSONFILE and $JSONFILE"
|
[[ -n "$JSONFILE" ]] && fatal "Can't write to both $PARENT_JSONFILE and $JSONFILE" $ERR_CMDLINE
|
||||||
JSONFILE="$PARENT_JSONFILE"
|
JSONFILE="$PARENT_JSONFILE"
|
||||||
fi
|
fi
|
||||||
[[ -n "$JSONFILE" ]] && [[ ! -d "$JSONFILE" ]] && filename_provided=true
|
[[ -n "$JSONFILE" ]] && [[ ! -d "$JSONFILE" ]] && filename_provided=true
|
||||||
@ -1386,7 +1386,7 @@ csv_header() {
|
|||||||
local filename_provided=false
|
local filename_provided=false
|
||||||
|
|
||||||
if [[ -n "$PARENT_CSVFILE" ]]; then
|
if [[ -n "$PARENT_CSVFILE" ]]; then
|
||||||
[[ -n "$CSVFILE" ]] && fatal "Can't write to both $PARENT_CSVFILE and $CSVFILE"
|
[[ -n "$CSVFILE" ]] && fatal "Can't write to both $PARENT_CSVFILE and $CSVFILE" $ERR_CMDLINE
|
||||||
CSVFILE="$PARENT_CSVFILE"
|
CSVFILE="$PARENT_CSVFILE"
|
||||||
fi
|
fi
|
||||||
[[ -n "$CSVFILE" ]] && [[ ! -d "$CSVFILE" ]] && filename_provided=true
|
[[ -n "$CSVFILE" ]] && [[ ! -d "$CSVFILE" ]] && filename_provided=true
|
||||||
@ -1440,7 +1440,7 @@ html_header() {
|
|||||||
local filename_provided=false
|
local filename_provided=false
|
||||||
|
|
||||||
if [[ -n "$PARENT_HTMLFILE" ]]; then
|
if [[ -n "$PARENT_HTMLFILE" ]]; then
|
||||||
[[ -n "$HTMLFILE" ]] && fatal "Can't write to both $PARENT_HTMLFILE and $HTMLFILE"
|
[[ -n "$HTMLFILE" ]] && fatal "Can't write to both $PARENT_HTMLFILE and $HTMLFILE" $ERR_CMDLINE
|
||||||
HTMLFILE="$PARENT_HTMLFILE"
|
HTMLFILE="$PARENT_HTMLFILE"
|
||||||
fi
|
fi
|
||||||
[[ -n "$HTMLFILE" ]] && [[ ! -d "$HTMLFILE" ]] && filename_provided=true
|
[[ -n "$HTMLFILE" ]] && [[ ! -d "$HTMLFILE" ]] && filename_provided=true
|
||||||
@ -1519,7 +1519,7 @@ prepare_logging() {
|
|||||||
local filename_provided=false
|
local filename_provided=false
|
||||||
|
|
||||||
if [[ -n "$PARENT_LOGFILE" ]]; then
|
if [[ -n "$PARENT_LOGFILE" ]]; then
|
||||||
[[ -n "$LOGFILE" ]] && fatal "Can't write to both $PARENT_LOGFILE and $LOGFILE"
|
[[ -n "$LOGFILE" ]] && fatal "Can't write to both $PARENT_LOGFILE and $LOGFILE" $ERR_CMDLINE
|
||||||
LOGFILE="$PARENT_LOGFILE"
|
LOGFILE="$PARENT_LOGFILE"
|
||||||
fi
|
fi
|
||||||
[[ -n "$LOGFILE" ]] && [[ ! -d "$LOGFILE" ]] && filename_provided=true
|
[[ -n "$LOGFILE" ]] && [[ ! -d "$LOGFILE" ]] && filename_provided=true
|
||||||
@ -22072,7 +22072,7 @@ parse_cmd_line() {
|
|||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
--help|-b|--banner|-v|--version)
|
--help|-b|--banner|-v|--version)
|
||||||
fatal "$1 is a standalone command line option"
|
fatal "$1 is a standalone command line option" $ERR_CMDLINE
|
||||||
;;
|
;;
|
||||||
--mx)
|
--mx)
|
||||||
do_mx_all_ips=true
|
do_mx_all_ips=true
|
||||||
|
Loading…
Reference in New Issue
Block a user