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

Implement a fail-fast $(shell) #96

Merged
merged 6 commits into from
Feb 3, 2024
Merged

Conversation

bahmanm
Copy link
Owner

@bahmanm bahmanm commented Jan 28, 2024

Implement a $(shell) alternative which automatically causes the make process to abort in case the given command exits w/ a non-zero value.

Example:

Makefile:

VAR1 := $(call bmakelib.shell.error-if-nonzero, echo Kaboom! 💣 && false)

some-target :
	@echo Unreachable recipe ⛔

Shell:

$ make some-target
Makefile:4: *** bmakelib.shell.error-if-nonzero: Command exited with non-zero value 1.  Stop.

📚 Full docs can be viewed at https://github.com/bahmanm/bmakelib/blob/95-implement-a-fail-fast-%24shell/doc/shell.md

@bahmanm bahmanm linked an issue Jan 28, 2024 that may be closed by this pull request
@bahmanm bahmanm added the ✅ enhancement New feature or request label Jan 29, 2024
@bahmanm bahmanm added this to the v0.7.0 milestone Jan 29, 2024
@bahmanm bahmanm self-assigned this Jan 29, 2024
@bahmanm bahmanm merged commit 66046fc into main Feb 3, 2024
2 checks passed
@bahmanm bahmanm deleted the 95-implement-a-fail-fast-$shell branch February 3, 2024 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✅ enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement a fail fast $(shell)
1 participant