mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-04-08 04:03:38 +00:00
16 lines
443 B
Bash
Executable File
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 "$@"
|