tools/setup: skip native package managers if we can (#38112)

* tools/setup: skip native package managers if we can

* revert that
This commit is contained in:
Adeeb Shihadeh
2026-05-30 13:06:45 -07:00
committed by GitHub
parent d937401511
commit 609a5c3cfa
+12 -1
View File
@@ -30,8 +30,19 @@ function install_linux_deps() {
SUDO="sudo"
fi
local missing_linux_deps=0
for cmd in gcc g++ make curl curl-config git; do
if ! command -v "$cmd" > /dev/null 2>&1; then
missing_linux_deps=1
break
fi
done
# normal stuff, this mostly for bare docker images
if command -v apt-get > /dev/null 2>&1; then
if [[ "$missing_linux_deps" -eq 0 ]]; then
# the native package managers are slow, so skip if we canNM_CONNECTIONS_DIRS
echo "[ ] system packages already installed t=$SECONDS"
elif command -v apt-get > /dev/null 2>&1; then
$SUDO apt-get update
$SUDO apt-get install -y --no-install-recommends ca-certificates build-essential curl libcurl4-openssl-dev locales git
elif command -v dnf > /dev/null 2>&1; then