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

Continue the process even if posting a message to Slack is failed #61

Merged
merged 1 commit into from
Aug 27, 2019

Conversation

Chikashi-Kato
Copy link
Member

@Chikashi-Kato Chikashi-Kato commented Jul 4, 2019

This PR is addressing the issue #40. After merging this PR, slacktee continues the process even if posting a message to Slack is failed.
The content of #40 is below:


Currently, slacktee exits immediately with the error code if it fails to send a message to Slack or some other errors happen (e.g. webhook URL is not configured).
However, this was not ideal behavior as a tee-like-command because it blocks piped subsequent commands.

Here is the example:

cat test.txt | slacktee -n | mail foo@bar.com
If webhook URL is not configured, slacktee fails immediately and following mail command cannot read the output of cat command.

cat test.txt | tee inaccessible_file.txt | mail foo@bar.com
Even if tee cannot open inaccessible_file.txt, tee outputs an error message to STDERR and then continues to pass the input to mail command.

In order to minimize the chance to interfere the operation of the piped subsequent commands, slacktee should try to follow the error handling behavior of tee command.

@Chikashi-Kato Chikashi-Kato self-assigned this Jul 4, 2019
@Chikashi-Kato Chikashi-Kato merged commit 817ee81 into master Aug 27, 2019
@Chikashi-Kato
Copy link
Member Author

Since this PR is open long time but no one review it, I'm merged this.

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.

None yet

2 participants