File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 36
36
from ansiblelint .app import App
37
37
from ansiblelint .color import console , console_options , reconfigure , render_yaml
38
38
from ansiblelint .config import options
39
- from ansiblelint .constants import ANSIBLE_MISSING_RC , EXIT_CONTROL_C_RC
39
+ from ansiblelint .constants import EXIT_CONTROL_C_RC
40
40
from ansiblelint .file_utils import abspath , cwd , normpath
41
41
from ansiblelint .prerun import check_ansible_presence , prepare_environment
42
42
from ansiblelint .skip_utils import normalize_tag
@@ -81,15 +81,12 @@ def initialize_options(arguments: Optional[List[str]] = None) -> None:
81
81
new_options .cwd = pathlib .Path .cwd ()
82
82
83
83
if new_options .version :
84
- ansible_version , err = check_ansible_presence ()
84
+ ansible_version , _ = check_ansible_presence (exit_on_error = True )
85
85
print (
86
86
"ansible-lint {ver!s} using ansible {ansible_ver!s}" .format (
87
87
ver = __version__ , ansible_ver = ansible_version
88
88
)
89
89
)
90
- if err :
91
- _logger .error (err )
92
- sys .exit (ANSIBLE_MISSING_RC )
93
90
sys .exit (0 )
94
91
95
92
if new_options .colored is None :
You can’t perform that action at this time.
0 commit comments