mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-04 16:34:52 +03:00
fix(ci): support runner ShellCheck diagnostics for indirect calls
Ubuntu 24.04 ships ShellCheck 0.9.0, which reports SC2317 for the EXIT cleanup and dynamically loaded installer test stubs. Scope both old and new diagnostic annotations to those indirect functions and regenerate both standalone scripts. Verified all shell checks and rootless regressions on the runner version as well as ShellCheck 0.11.0.
This commit is contained in:
+2
-1
@@ -301,7 +301,8 @@ ip_ssl_issue_and_install() (
|
||||
umask 077
|
||||
mkdir -p "$cert_dir" || return 1
|
||||
stage=$(mktemp -d "$cert_dir/.xui-install.XXXXXX") || return 1
|
||||
# shellcheck disable=SC2329
|
||||
# Invoked indirectly by the EXIT trap; older ShellCheck reports SC2317.
|
||||
# shellcheck disable=SC2317,SC2329
|
||||
ip_ssl_install_cleanup() {
|
||||
restored=1
|
||||
if ((attempted && !installed)); then
|
||||
|
||||
@@ -244,7 +244,8 @@ ip_ssl_issue_and_install() (
|
||||
umask 077
|
||||
mkdir -p "$cert_dir" || return 1
|
||||
stage=$(mktemp -d "$cert_dir/.xui-install.XXXXXX") || return 1
|
||||
# shellcheck disable=SC2329
|
||||
# Invoked indirectly by the EXIT trap; older ShellCheck reports SC2317.
|
||||
# shellcheck disable=SC2317,SC2329
|
||||
ip_ssl_install_cleanup() {
|
||||
restored=1
|
||||
if ((attempted && !installed)); then
|
||||
|
||||
@@ -12,9 +12,9 @@ source /dev/stdin < <(awk '/^# BEGIN GENERATED IP SSL HELPERS/ {block=1;next} /^
|
||||
source_function "$ROOT/install.sh" prompt_or_default
|
||||
source_function "$ROOT/install.sh" prompt_and_setup_ssl
|
||||
# Invoked by the real installer function loaded above, before the failure stubs.
|
||||
# shellcheck disable=SC2329
|
||||
# shellcheck disable=SC2317,SC2329
|
||||
setup_ip_certificate() { captured="${2:-}"; called=1; }
|
||||
# shellcheck disable=SC2329
|
||||
# shellcheck disable=SC2317,SC2329
|
||||
systemctl() { stopped=1; }
|
||||
export NONINTERACTIVE=1 XUI_SSL_MODE=ip XUI_SSL_IPV6='not:ipv6'
|
||||
called=0; stopped=0
|
||||
|
||||
@@ -287,7 +287,8 @@ ip_ssl_issue_and_install() (
|
||||
umask 077
|
||||
mkdir -p "$cert_dir" || return 1
|
||||
stage=$(mktemp -d "$cert_dir/.xui-install.XXXXXX") || return 1
|
||||
# shellcheck disable=SC2329
|
||||
# Invoked indirectly by the EXIT trap; older ShellCheck reports SC2317.
|
||||
# shellcheck disable=SC2317,SC2329
|
||||
ip_ssl_install_cleanup() {
|
||||
restored=1
|
||||
if ((attempted && !installed)); then
|
||||
|
||||
Reference in New Issue
Block a user