File tree 1 file changed +19
-0
lines changed
1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,25 @@ function _app_prereqs_validate() {
21
21
is_cmd_available " cfssljson" has_cfssljson_cmd
22
22
is_cmd_available " helm" has_helm_cmd
23
23
24
+ if [[ $has_yq_cmd == true ]]; then
25
+ debug_log " yq is installed. Checking version..."
26
+ run_a_script " yq --version" yq_version
27
+ if [[ " ${yq_version} " == * " ${VER_YQ} " * ]]; then
28
+ debug_log " yq version is correct. (${VER_YQ} )"
29
+ else
30
+ debug_log " yq version is incorrect. Expected: ${VER_YQ} . Found: ${yq_version} . Removing previous to trigger reinstall"
31
+ run_a_script " which -a yq" yq_paths
32
+ for yq_path in $yq_paths ; do
33
+ if [[ -f " $yq_path " ]]; then
34
+ debug_log " Removing yq at $yq_path "
35
+ run_a_script " sudo rm -f $yq_path "
36
+ debug_log " ...successfull removed old version of yq at $yq_path "
37
+ fi
38
+ done
39
+ debug_log " Successfully removed previous versions of yq"
40
+ has_yq_cmd=false
41
+ fi
42
+ fi
24
43
25
44
if [[ $has_yq_cmd == true ]] && [[ $has_jq_cmd == true ]] && [[ $has_regctl_cmd == true ]] && [[ $has_cfssl_cmd == true ]] && [[ $has_cfssljson_cmd == true ]] && [[ $has_helm_cmd == true ]]; then
26
45
info_log " All third party apps are installed and available."
You can’t perform that action at this time.
0 commit comments