Skip to content

Commit

Permalink
Use option from the docs
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Spear <[email protected]>
  • Loading branch information
Thomas Spear authored and kaplanlior committed May 1, 2022
1 parent 25be459 commit 5846333
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ CxPolicy[result] {
"documentId": input.document[i].id,
"searchKey": sprintf("FROM={{%s}}.RUN={{%s}}", [name, resource.Value[0]]),
"issueType": "IncorrectValue",
"keyExpectedValue": "When running `dnf install`, `-y` or `--assume-yes` switch is set to avoid build failure ",
"keyActualValue": sprintf("Command `FROM={{%s}}.RUN={{%s}}` doesn't have the `-y` or `--assume-yes` switch set", [name, trim_space(commands[k])]),
"keyExpectedValue": "When running `dnf install`, `-y` or `--assumeyes` switch is set to avoid build failure ",
"keyActualValue": sprintf("Command `FROM={{%s}}.RUN={{%s}}` doesn't have the `-y` or `--assumeyes` switch set", [name, trim_space(commands[k])]),
}
}

Expand All @@ -37,5 +37,5 @@ hasInstallCommandWithoutFlag(command) = c {
}

hasYesFlag(command) {
regex.match("\\b(dnf *install (-y|-[\\D]{1}y|-y[\\D]{1}|-yes|--assume-yes))\\b [\\w\\W]*", command)
regex.match("\\b(dnf *install (-y|-[\\D]{1}y|-y[\\D]{1}|-yes|--assumeyes))\\b [\\w\\W]*", command)
}

0 comments on commit 5846333

Please sign in to comment.