set git safe.directory to workspace to get commit hash during make

This commit is contained in:
Mauro Vietri 2025-12-27 23:11:52 -03:00
parent 2d0db7d73a
commit 4788136b10

View file

@ -16,7 +16,7 @@ NORM=$(shell tput sgr0)
ifeq ($(CONTAINER_NAME),)
shell: .build
$(info $(BOLD)Starting $(TOOLCHAIN_NAME)...$(NORM))
docker run -it --rm -v "$(WORKSPACE_DIR)":/root/workspace $(TOOLCHAIN_NAME) /bin/bash
docker run -it --rm -v "$(WORKSPACE_DIR)":/root/workspace $(TOOLCHAIN_NAME) /bin/bash -c "git config --global --add safe.directory /root/workspace && exec bash"
else
shell:
$(info $(BOLD)Connecting to running $(TOOLCHAIN_NAME)...$(NORM))