local/bin/rshare: Fallback to no-container on failure.

master
Pierre Neidhardt 2020-12-15 16:56:24 +01:00
parent b1419fc059
commit 4fc2ca881d
1 changed files with 2 additions and 1 deletions

View File

@ -88,7 +88,8 @@ share_python() {
echo >&2 "Python HTTP server will listen on $IP:$PORT."
if command -v guix >/dev/null 2>&1; then
guix environment -C -N --expose="$TARGET"="$TARGET" --ad-hoc python -- \
python3 -m http.server -d "$TARGET" $PORT
python3 -m http.server -d "$TARGET" $PORT || \
guix environment --ad-hoc python -- python3 -m http.server -d "$TARGET" $PORT
elif command -v python3 >/dev/null 2>&1; then
python3 -m http.server -d "$TARGET" $PORT
else