mirror of https://github.com/CISOfy/lynis.git
Display function creates wrong indentation of result column (#237)
This commit is contained in:
parent
bfefb1c02f
commit
0b5b4a47a3
|
@ -510,8 +510,10 @@
|
|||
fi
|
||||
|
||||
if [ ${SHOW} -eq 1 ]; then
|
||||
# Display (counting with -m instead of -c, to support language locale)
|
||||
LINESIZE=`echo "${TEXT}" | wc -m | tr -d ' '`
|
||||
# Display:
|
||||
# - counting with -m instead of -c, to support language locale
|
||||
# - wc needs LANG to deal with multi-bytes characters but LANG has been unset in include/consts...
|
||||
LINESIZE=`export LC_ALL= ; export LANG="${DISPLAY_LANG}";echo "${TEXT}" | wc -m | tr -d ' '`
|
||||
if [ ${SHOWDEBUG} -eq 1 ]; then DEBUGTEXT=" [${PURPLE}DEBUG${NORMAL}]"; else DEBUGTEXT=""; fi
|
||||
if [ ${INDENT} -gt 0 ]; then SPACES=$((62 - INDENT - LINESIZE)); fi
|
||||
if [ ${SPACES} -lt 0 ]; then SPACES=0; fi
|
||||
|
|
3
lynis
3
lynis
|
@ -49,6 +49,9 @@
|
|||
# Version number of report files (when format changes in future)
|
||||
REPORT_version_major="1"; REPORT_version_minor="0"
|
||||
REPORT_version="${REPORT_version_major}.${REPORT_version_minor}"
|
||||
|
||||
DISPLAY_LANG=$LANG # requiered by function Display to deal with multi-bytes characters.
|
||||
|
||||
#
|
||||
#################################################################################
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue