mirror of
https://github.com/docker/docker-bench-security.git
synced 2024-11-01 00:21:45 +01:00
modified get_docker_configuration_file_args jq command to remove \'null\' return
This commit is contained in:
parent
23110269a6
commit
c4b7d36042
1 changed files with 1 additions and 1 deletions
|
@ -123,7 +123,7 @@ get_docker_configuration_file_args() {
|
||||||
get_docker_configuration_file
|
get_docker_configuration_file
|
||||||
|
|
||||||
if "$HAVE_JQ"; then
|
if "$HAVE_JQ"; then
|
||||||
jq --monochrome-output --raw-output ".[\"${OPTION}\"]" "$CONFIG_FILE"
|
jq --monochrome-output --raw-output "if has(\"${OPTION}\") then .[\"${OPTION}\"] else \"\" end" "$CONFIG_FILE"
|
||||||
else
|
else
|
||||||
cat "$CONFIG_FILE" | tr , '\n' | grep "$OPTION" | sed 's/.*://g' | tr -d '" ',
|
cat "$CONFIG_FILE" | tr , '\n' | grep "$OPTION" | sed 's/.*://g' | tr -d '" ',
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue