Fix sudo Docker build (#18736)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Francesco Mattioli 2025-01-17 14:48:15 +01:00 committed by GitHub
parent f777b63c8b
commit 3672cb160e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -791,7 +791,7 @@ def is_sudo_available() -> bool:
"""
if WINDOWS:
return False
return subprocess.run(["sudo", "--version"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL).returncode == 0
subprocess.run("sudo --version", shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL).returncode == 0
# Run checks and define constants