fix(install): friendly bash guard instead of cryptic pipefail error under sh
This commit is contained in:
1 parent
5f838b7146
commit
57e627bad0
1 file changed
+8
@@ -11,6 +11,14 @@
|
|||||||
# AGENT_ARKA_INIT 1 to run `agent-arka init --quick` when no config.toml exists (default: 1)
|
# AGENT_ARKA_INIT 1 to run `agent-arka init --quick` when no config.toml exists (default: 1)
|
||||||
# LIBREFANG_* names for the same keys still work.
|
# LIBREFANG_* names for the same keys still work.
|
||||||
|
|
||||||
|
# Fail with a clear hint when piped into POSIX `sh` (dash) — this script needs
|
||||||
|
# bash (pipefail, [[ ]], indirect expansion). `curl … | bash`, not `| sh`.
|
||||||
|
if [ -z "${BASH_VERSION:-}" ]; then
|
||||||
|
echo "Agent Arka installer needs bash. Run:" >&2
|
||||||
|
echo " curl -fsSL https://git.arka-ai.ru/arka/public/raw/branch/main/agent-arka/install.sh | bash" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
PUBLIC_API="${AGENT_ARKA_PUBLIC_API:-https://git.arka-ai.ru/api/v1}"
|
PUBLIC_API="${AGENT_ARKA_PUBLIC_API:-https://git.arka-ai.ru/api/v1}"
|
||||||
|
|||||||
Reference in new issue
Block a user