fix: log_action to stderr so captured paths stay valid
find_remote_ssh_monitor_path output was polluted by log_action on stdout, breaking -f checks; mirror user messages to stderr instead.
This commit is contained in:
@@ -216,11 +216,11 @@ log_message() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Всегда в лог; в stdout — если не --quiet (удобно при ручном запуске и cron с mail)
|
# Всегда в лог; в stderr — если не --quiet (stdout не трогаем: его используют $(find_*))
|
||||||
log_action() {
|
log_action() {
|
||||||
log_message "INFO" "$1"
|
log_message "INFO" "$1"
|
||||||
if [ "$QUIET" -eq 0 ]; then
|
if [ "$QUIET" -eq 0 ]; then
|
||||||
printf '[update_ssh_monitor] %s\n' "$1"
|
printf '[update_ssh_monitor] %s\n' "$1" >&2
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -782,6 +782,8 @@ update_script() {
|
|||||||
sync_installed_updater_from_clone "$@"
|
sync_installed_updater_from_clone "$@"
|
||||||
|
|
||||||
actual_script_path="$(find_remote_ssh_monitor_path 2>/dev/null || true)"
|
actual_script_path="$(find_remote_ssh_monitor_path 2>/dev/null || true)"
|
||||||
|
actual_script_path="${actual_script_path//$'\n'/}"
|
||||||
|
actual_script_path="${actual_script_path//$'\r'/}"
|
||||||
debug_step "Путь к ssh-monitor в клоне: ${actual_script_path:-не найден}"
|
debug_step "Путь к ssh-monitor в клоне: ${actual_script_path:-не найден}"
|
||||||
|
|
||||||
SAC_CLIENT_CHANGED=0
|
SAC_CLIENT_CHANGED=0
|
||||||
|
|||||||
Reference in New Issue
Block a user