fix macos user homedir in makefile (#8133)

This commit is contained in:
Alex Sharov 2023-09-06 09:49:08 +07:00 committed by GitHub
parent 8983128d24
commit 1c4eb4f280
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -252,7 +252,6 @@ release: git-submodules
# we need separate envvars to facilitate creation of the erigon user on the host OS. # we need separate envvars to facilitate creation of the erigon user on the host OS.
ERIGON_USER_UID ?= 3473 ERIGON_USER_UID ?= 3473
ERIGON_USER_GID ?= 3473 ERIGON_USER_GID ?= 3473
ERIGON_USER_XDG_DATA_HOME ?= ~$(ERIGON_USER)/.local/share
## user_linux: create "erigon" user (Linux) ## user_linux: create "erigon" user (Linux)
user_linux: user_linux:
@ -266,7 +265,7 @@ endif
ifdef DOCKER ifdef DOCKER
sudo usermod -aG docker $(ERIGON_USER) sudo usermod -aG docker $(ERIGON_USER)
endif endif
sudo -u $(ERIGON_USER) mkdir -p $(ERIGON_USER_XDG_DATA_HOME) sudo -u $(ERIGON_USER) mkdir -p /home/$(ERIGON_USER)/.local/share
## user_macos: create "erigon" user (MacOS) ## user_macos: create "erigon" user (MacOS)
user_macos: user_macos:
@ -276,7 +275,7 @@ user_macos:
sudo dscl . -create /Users/$(ERIGON_USER) PrimaryGroupID $(ERIGON_USER_GID) sudo dscl . -create /Users/$(ERIGON_USER) PrimaryGroupID $(ERIGON_USER_GID)
sudo dscl . -create /Users/$(ERIGON_USER) NFSHomeDirectory /Users/$(ERIGON_USER) sudo dscl . -create /Users/$(ERIGON_USER) NFSHomeDirectory /Users/$(ERIGON_USER)
sudo dscl . -append /Groups/admin GroupMembership $(ERIGON_USER) sudo dscl . -append /Groups/admin GroupMembership $(ERIGON_USER)
sudo -u $(ERIGON_USER) mkdir -p $(ERIGON_USER_XDG_DATA_HOME) sudo -u $(ERIGON_USER) mkdir -p /Users/$(ERIGON_USER)/.local/share
## coverage: run code coverage report and output total coverage % ## coverage: run code coverage report and output total coverage %
.PHONY: coverage .PHONY: coverage