Fail when hostname contains whitespace (#1894)

This commit is contained in:
Wojtek Mach 2023-05-04 13:52:21 +02:00 committed by GitHub
parent e7f8ee8ca8
commit f58075eb62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,6 +2,12 @@ if [ -f "$HOME/.livebookdesktop.sh" ]; then
. "$HOME/.livebookdesktop.sh"
fi
hostname=`hostname`
if [[ "$hostname" =~ " " ]]; then
echo "[error] system hostname ($hostname) cannot contain whitespaces"
exit 1
fi
export RELEASE_NODE=livebook_app
export RELEASE_MODE=interactive
export MIX_ARCHIVES="${RELEASE_ROOT}/vendor/archives"