2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-30 22:05:27 +00:00

rc.apparmor.functions: check command exit status directly

Thanks, shellcheck!
This commit is contained in:
intrigeri
2022-02-13 07:18:43 +00:00
parent 0bae8bf82a
commit 2e0fb86a94

View File

@@ -132,8 +132,7 @@ __parse_profiles_dir() {
fi
# shellcheck disable=SC2086
"$PARSER" $PARSER_OPTS "$parser_cmd" -- "$profile_dir"
if [ $? -ne 0 ]; then
if ! "$PARSER" $PARSER_OPTS "$parser_cmd" -- "$profile_dir"; then
status=1
aa_log_failure_msg "At least one profile failed to load"
fi