diff --git a/orbit/tools/cleanup/cleanup_macos.sh b/orbit/tools/cleanup/cleanup_macos.sh index aa47d4a94bb6..4a9c3b2283fb 100755 --- a/orbit/tools/cleanup/cleanup_macos.sh +++ b/orbit/tools/cleanup/cleanup_macos.sh @@ -1,6 +1,6 @@ #!/bin/sh -if [ $(id -u) -ne 0 ]; then +if [ $(id -u) -ne 0 -a -z "$GITHUB_ACTIONS" ]; then echo "Please run as root" exit 1 fi @@ -28,5 +28,11 @@ else # We are in the parent shell, start the detached child and return success echo "Removing fleet, system will be unenrolled in 15 seconds..." echo "Executing detached child process" - bash -c "bash $0 remove >/dev/null 2>/dev/null /dev/null 2>/dev/null /dev/null 2>/dev/null