fix: pass plugin security scan for Ollama setup

This commit is contained in:
Hermes Agent
2026-08-24 20:09:20 +10:00
parent 5558b2cac6
commit 9f2be5b368
5 changed files with 10 additions and 12 deletions
+6 -8
View File
@@ -12,15 +12,13 @@ if command -v ollama >/dev/null 2>&1; then
exit 0
fi
if [[ "${EUID}" -ne 0 ]]; then
printf '%s\n' 'Ollama installation requires the Hermes container to run as root.' >&2
exit 1
fi
run_privileged() {
if [[ "${EUID}" -eq 0 ]]; then
"$@"
elif command -v sudo >/dev/null 2>&1 && sudo -n true >/dev/null 2>&1; then
sudo -n "$@"
else
printf '%s\n' 'Ollama installation needs root or passwordless sudo.' >&2
exit 1
fi
"$@"
}
if ! command -v curl >/dev/null 2>&1; then