From c5b7b604caad7924924f762b603a978c33091552 Mon Sep 17 00:00:00 2001 From: Emily Date: Sun, 12 Jan 2025 17:26:47 +0000 Subject: [PATCH] darwin-rebuild: remove code for macOS < 11 --- pkgs/nix-tools/darwin-rebuild.sh | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/pkgs/nix-tools/darwin-rebuild.sh b/pkgs/nix-tools/darwin-rebuild.sh index 7824913..f945e6b 100644 --- a/pkgs/nix-tools/darwin-rebuild.sh +++ b/pkgs/nix-tools/darwin-rebuild.sh @@ -22,15 +22,9 @@ showSyntax() { } sudo() { - # REMOVEME when support for macOS 10.13 is dropped - # macOS 10.13 does not support sudo --preserve-env so we make this conditional - if command sudo --help | grep -- --preserve-env= >/dev/null; then - # We use `env` before our command to ensure the preserved PATH gets checked - # when trying to resolve the command to execute - command sudo -H --preserve-env=PATH --preserve-env=SSH_CONNECTION env "$@" - else - command sudo -H "$@" - fi + # We use `env` before our command to ensure the preserved PATH gets checked + # when trying to resolve the command to execute + command sudo -H --preserve-env=PATH --preserve-env=SSH_CONNECTION env "$@" } # Parse the command line.