Skip to content

Commit 81c61bb

Browse files
committed
fix: now update checker can work when using -cpm param #41
1 parent 153e716 commit 81c61bb

File tree

1 file changed

+22
-13
lines changed

1 file changed

+22
-13
lines changed

vuh.sh

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@
207207
# Written by Shishkin Sergey <[email protected]>
208208

209209
# Current vuh version
210-
VUH_VERSION='2.12.0'
210+
VUH_VERSION='2.12.1'
211211

212212
# Installation variables (Please don't modify!)
213213
DATA_DIR='<should_be_replace_after_installation:DATA_DIR>'
@@ -453,20 +453,27 @@ function _load_project_variables_from_config() {
453453
rm -f "/tmp/${APP_NAME}_projects_conf_file"
454454
return 1
455455
}
456+
rm -f "/tmp/${APP_NAME}_projects_conf_file"
457+
}
458+
459+
function _use_current_project_module() {
460+
SPECIFIED_PROJECT_MODULE=$(_get_project_module_for_current_directory) || {
461+
_show_error_message "Failed to get project module! Current directory doesn't belong to any project module."
462+
return 1
463+
}
464+
if [ "$(echo "$SPECIFIED_PROJECT_MODULE" | wc -l)" != "1" ]; then
465+
_show_info_message "Current directory owned by multiple modules:"
466+
_show_info_message "$SPECIFIED_PROJECT_MODULE"
467+
SPECIFIED_PROJECT_MODULE="$(echo "$SPECIFIED_PROJECT_MODULE" | tr '\n' ',')"
468+
SPECIFIED_MULTIPLE_PROJECT_MODULES='true'
469+
_handle_multiple_modules_call || exit 1
470+
fi
471+
}
472+
473+
function _select_specified_project_module() {
456474
if [ "$ARGUMENT_USE_CURRENT_PROJECT_MODULE" = 'true' ]; then
457-
SPECIFIED_PROJECT_MODULE=$(_get_project_module_for_current_directory) || {
458-
_show_error_message "Failed to get project module! Current directory doesn't belong to any project module."
459-
return 1
460-
}
461-
if [ "$(echo "$SPECIFIED_PROJECT_MODULE" | wc -l)" != "1" ]; then
462-
_show_info_message "Current directory owned by multiple modules:"
463-
_show_info_message "$SPECIFIED_PROJECT_MODULE"
464-
SPECIFIED_PROJECT_MODULE="$(echo "$SPECIFIED_PROJECT_MODULE" | tr '\n' ',')"
465-
SPECIFIED_MULTIPLE_PROJECT_MODULES='true'
466-
_handle_multiple_modules_call || exit 1
467-
fi
475+
_use_current_project_module || return 1
468476
fi
469-
rm -f "/tmp/${APP_NAME}_projects_conf_file"
470477
[ "$SPECIFIED_MULTIPLE_PROJECT_MODULES" = 'true' ] || _use_module_configuration_if_it_exists "$SPECIFIED_PROJECT_MODULE"
471478
}
472479

@@ -851,6 +858,7 @@ function _load_local_conf_file() {
851858
_show_error_message "Failed to load variables from local configuration file $full_conf_dir/.vuh!"
852859
return 1
853860
}
861+
_select_specified_project_module || return 1
854862
_check_conf_data_loaded_properly || return 1
855863
}
856864

@@ -870,6 +878,7 @@ function _load_remote_conf_file() {
870878
_show_error_message "Failed to load variables from remote configuration file $handling_config_file!"
871879
return 1
872880
}
881+
_select_specified_project_module || return 1
873882
_check_conf_data_loaded_properly || return 1
874883
}
875884

0 commit comments

Comments
 (0)