Update tools.func

This commit is contained in:
CanbiZ 2025-04-29 15:37:41 +02:00
parent 8b68b90a1d
commit e659b09963

View File

@ -843,12 +843,14 @@ function setup_uv() {
}
function ensure_usr_local_bin_persist() {
if command -v pveversion &>/dev/null; then
return
fi
local PROFILE_FILE="/etc/profile.d/custom_path.sh"
[[ ! -f "$PROFILE_FILE" ]] && {
echo 'export PATH="/usr/local/bin:$PATH"' >"$PROFILE_FILE"
chmod +x "$PROFILE_FILE"
}
[[ ":$PATH:" != *":/usr/local/bin:"* ]] && export PATH="/usr/local/bin:$PATH"
}