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

Add '--no-fallback-messages' flag to silence fallback messages #28

Merged
merged 2 commits into from
Mar 14, 2018

Conversation

lambdalisue
Copy link
Contributor

Currently, fallback messages are always shown when the lemonade server is down.

I understand that it is quite important to tell what happens to the users.
However, I often found that the messages are bit annoying, especially when I
use lemonade as a clipboard program of neovim by manually assign g:clipboard.

So I added '--no-fallback-messages' flag to silence this warning like:

    $ echo 'hello' | pbcopy

    $ ./lemonade paste --host="127.0.0.1" --no-fallback-messages
    hello

    $ ./lemonade paste --host="127.0.0.1"
    2018/01/24 06:05:37 dial tcp 127.0.0.1:2489: getsockopt: connection refused
    2018/01/24 06:05:37 Fall back to localhost
    hello

This commit fixes #27

In my environment, the tests failed because of the config file.

I think it is not good idea to rely on the config file during tests
so I added 'skip' to skip reading the config file.
Currently, fallback messages are always shown when the lemonade server is down.

I understand that it is quite important to tell what happens to the users.
However, I often found that the messages are bit annoying, especially when I
use lemonade as a clipboard program of neovim by manually assign `g:clipboard`.

So I added '--no-fallback-messages' flag to silence this warning like:

    $ echo 'hello' | pbcopy

    $ ./lemonade paste --host="127.0.0.1" --no-fallback-messages
    hello

    $ ./lemonade paste --host="127.0.0.1"
    2018/01/24 06:05:37 dial tcp 127.0.0.1:2489: getsockopt: connection refused
    2018/01/24 06:05:37 Fall back to localhost
    hello

This commit fixes lemonade-command#27
@pocke
Copy link
Member

pocke commented Jan 24, 2018

Thank you for your pull-request. The feature is reasonable to me.
But I have not maintained Lemonade (see. #25 ), so I don't have a plan that is reviewing this pull-request.
If someone reviews and approves, I'll merge this pull-request. Or I'll review it but I cannot do soon.

@lambdalisue
Copy link
Contributor Author

lambdalisue commented Jan 24, 2018

Fair enough. I wait 👍

@raa0121
Copy link
Member

raa0121 commented Mar 13, 2018

LGTM

@pocke pocke merged commit cf62242 into lemonade-command:master Mar 14, 2018
@pocke
Copy link
Member

pocke commented Mar 14, 2018

@lambdalisue @raa0121 Thank you!

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.

Add silent mode for client when there is no connection
3 participants