Skip to content

Commit

Permalink
Fix error printed to screen when run from shell without "command" (CI…
Browse files Browse the repository at this point in the history
…SOfy#601)

Issue is present on busybox ash shell without "command" builtin. Fix
issue by redirecting errors to /dev/null
  • Loading branch information
theycallhimpat authored and mboelen committed Dec 17, 2018
1 parent 0f32d27 commit d024d52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lynis
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Make sure to execute ${PROGRAM_NAME} from untarred directory or check your insta
fi

# Auto detection of language based on locale (first two characters). Set to English when nothing found.
if [ -x "$(command -v locale)" ]; then
if [ -x "$(command -v locale 2> /dev/null)" ]; then
LANGUAGE=$(locale | egrep "^LANG=" | cut -d= -f2 | cut -d_ -f1 | egrep "^[a-z]{2}$")
fi
if [ -z "${LANGUAGE}" ]; then
Expand Down

0 comments on commit d024d52

Please sign in to comment.