Files
hkuds--nanobot/entrypoint.sh
T
wehub-resource-sync ba1d0b91a4
Test Suite / webui (push) Failing after 1s
Test Suite / test (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:06:36 +08:00

16 lines
443 B
Bash
Executable File

#!/bin/sh
dir="$HOME/.nanobot"
if [ -d "$dir" ] && [ ! -w "$dir" ]; then
owner_uid=$(stat -c %u "$dir" 2>/dev/null || stat -f %u "$dir" 2>/dev/null)
cat >&2 <<EOF
Error: $dir is not writable (owned by UID $owner_uid, running as UID $(id -u)).
Fix (pick one):
Host: sudo chown -R 1000:1000 ~/.nanobot
Docker: docker run --user \$(id -u):\$(id -g) ...
Podman: podman run --userns=keep-id ...
EOF
exit 1
fi
exec nanobot "$@"