Skip to content

Commit

Permalink
Revert "stat command changed (eth-educators#1750)"
Browse files Browse the repository at this point in the history
This reverts commit 3d3a6d0.
  • Loading branch information
yorickdowne committed Feb 19, 2024
1 parent 48f8761 commit 83b25c9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ethd
Original file line number Diff line number Diff line change
Expand Up @@ -3502,7 +3502,13 @@ fi

cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"
# Use this to make sure root doesn't end up owning files
OWNER=$(stat --format=%U .)
if [[ "$OSTYPE" == "darwin"* ]]; then
# This is a macOS-ism
# shellcheck disable=SC2016
OWNER=$(stat -f '$Su' .)
else
OWNER=$(stat -c '%U' .)
fi

if [ "${OWNER}" == "root" ]; then
echo "Please install Eth Docker as a non-root user."
Expand Down

0 comments on commit 83b25c9

Please sign in to comment.