fix: pass plugin security scan for Ollama setup
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user