install: add detecting broken symlinks before corepack. Also sleep so the warnings can be seen

This commit is contained in:
Aminda Suomalainen 2024-07-17 12:39:21 +03:00
parent 89a8c1772c
commit a7e5cc2aa3
Signed by: Mikaela
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q

View File

@ -54,11 +54,19 @@ if hash pre-commit 2> /dev/null; then
pre-commit gc pre-commit gc
fi fi
if hash symlinks 2> /dev/null; then
symlinks -d ~/.local/bin/
else
echo "WARNING! Executable named symlinks not found in PATH."
sleep 3
fi
if hash corepack 2> /dev/null; then if hash corepack 2> /dev/null; then
corepack enable --install-directory ~/.local/bin/ corepack enable --install-directory ~/.local/bin/
corepack enable npm --install-directory ~/.local/bin/ corepack enable npm --install-directory ~/.local/bin/
else else
echo "WARNING! corepack is not installed." echo "WARNING! corepack is not installed."
sleep 3
fi fi
if [ "$(id -u)" == "0" ]; then if [ "$(id -u)" == "0" ]; then