Skip to content
This repository was archived by the owner on Apr 24, 2026. It is now read-only.

fix infinite fork loop when dep fails in 'make vendor-install'#197

Open
nuno-silva wants to merge 1 commit into
gluster:masterfrom
nuno-silva:fix-fork-loop
Open

fix infinite fork loop when dep fails in 'make vendor-install'#197
nuno-silva wants to merge 1 commit into
gluster:masterfrom
nuno-silva:fix-fork-loop

Conversation

@nuno-silva
Copy link
Copy Markdown

In #164, a || $(MAKE) vendor-install was added to the vendor-install target to help with "poor network circumstances":

vendor-install:
@echo Installing vendored packages
@$(DEPENV) dep ensure -v -vendor-only || $(MAKE) vendor-install
@echo

However, this leads to an infinite fork loop when dep fails or is not installed, possibly crashing the host machine.

This PR works around the infinite loop by checking the MAKELEVEL and aborting if it gets too high, which still allows the command to be retried a reasonable number of times.
Another possible approach is just looping around dep a set number of times.

Fixes #195.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'make vendor-install' can lead to an infinite fork loop

1 participant