Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nuno-silva
Copy link

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 join this conversation on GitHub. Already have an account? Sign in to comment
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