Skip to content

Commit

Permalink
Check for ansible-lint version if not using an EE (#1578)
Browse files Browse the repository at this point in the history
  • Loading branch information
shatakshiiii authored Jul 20, 2023
1 parent 54aa811 commit b646d45
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import os
import shlex
import shutil
import subprocess
import sys
import zoneinfo

Expand Down Expand Up @@ -655,6 +656,24 @@ def lintables(
prefix=ExitPrefix.HINT,
),
)
else:
try:
subprocess.run("ansible-lint --version", shell=True, check=True)
except subprocess.CalledProcessError:
exit_messages.append(
ExitMessage(
message=("ansible-lint does not seem to be installed correctly.")
),
)
exit_messages.append(
ExitMessage(
message=(
"Ensure the command `ansible-lint --version` can be run prior to"
" using ansible-navigator"
),
prefix=ExitPrefix.HINT,
),
)

if isinstance(entry.value.current, str) and config.app == "lint":
entry_name = entry.settings_file_path(prefix="")
Expand Down

0 comments on commit b646d45

Please sign in to comment.