fix(shell): address ShellCheck warnings (remove SC2181 checks, safer prompt_secret, add selective suppressions)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

This commit is contained in:
igor04091968
2026-05-07 12:35:23 +03:00
parent 669501f20a
commit c9f3aad89c
8 changed files with 11 additions and 4 deletions
+1
View File
@@ -1,4 +1,5 @@
#!/bin/sh
# shellcheck disable=SC1007
set -eu
REPO_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
+1
View File
@@ -1,4 +1,5 @@
#!/bin/sh
# shellcheck disable=SC1007
set -eu
REPO_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
+1 -1
View File
@@ -18,7 +18,7 @@ echo "=== ActivityWatch Data Check: $HOSTNAME_FILTER ==="
echo ""
echo -n "Server connectivity... "
RESP=$(no_proxy=10.10.10.13 curl -s --connect-timeout 10 --max-time 15 "$SERVER/api/0/info" 2>&1)
if [ $? -eq 0 ] && echo "$RESP" | jq -e '.version' > /dev/null 2>&1; then
if echo "$RESP" | jq -e '.version' > /dev/null 2>&1; then
VERSION=$(echo "$RESP" | jq -r '.version')
echo -e "${GREEN}OK${NC} (aw-server v$VERSION)"
else
+1 -1
View File
@@ -22,7 +22,7 @@ echo ""
echo -e "${CYAN}--- 1. AW Server ($SERVER) ---${NC}"
echo -n " Connectivity... "
RESP=$(no_proxy=10.10.10.13 curl -s --connect-timeout 10 --max-time 15 "$SERVER/api/0/info" 2>&1)
if [ $? -eq 0 ] && echo "$RESP" | jq -e '.version' > /dev/null 2>&1; then
if echo "$RESP" | jq -e '.version' > /dev/null 2>&1; then
VERSION=$(echo "$RESP" | jq -r '.version')
echo -e " ${GREEN}OK${NC} (aw-server $VERSION)"
else
+1
View File
@@ -1,4 +1,5 @@
#!/bin/sh
# shellcheck disable=SC1007
set -eu
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
+1
View File
@@ -1,4 +1,5 @@
#!/bin/sh
# shellcheck disable=SC1007
set -eu
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
+1
View File
@@ -4,6 +4,7 @@ set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$ROOT_DIR"
# shellcheck disable=SC2034
KIT_DIR="install-kit-awindows-20260427-211240"
python - <<'PY'
+4 -2
View File
@@ -21,9 +21,11 @@ prompt_secret() {
if [[ -n "${!var_name:-}" ]]; then
return 0
fi
read -r -s -p "${prompt}: " "$var_name"
local _val
read -r -s -p "${prompt}: " _val
echo
export "$var_name"
printf -v "$var_name" '%s' "$_val"
declare -gx "$var_name"
}
require_cmd git