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

Exit with status code 1 if no endpoints found #64

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

Conversation

RobinBoers
Copy link

This allows people to write the following kind of code:

if  wm "$1" && prompt -y "Send mentions for these URLs?"; then
    wm "$1" --send
fi

Instead of this monstrosity:

out="$(wm "$1")"
echo "$out"

if [ "$out" != "No webmention endpoints found on 1 entries found (try increasing with --limit N)" ] && prompt -y "Send mentions for these URLs?"; then
  wm "$1" --send
fi

@remy
Copy link
Owner

remy commented Apr 9, 2024

Good change. Though, should it also exit(1) with the --send flag too?

@RobinBoers
Copy link
Author

RobinBoers commented Apr 10, 2024

As I see it, trying to send webmentions but failing to do so is a failure, so it should exit(1). But I'm open for other ideas too, what do you think?

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.

2 participants