Skip to content

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

Merged
pocke merged 2 commits into
lemonade-command:masterfrom
lambdalisue:master
Mar 14, 2018
Merged

Add '--no-fallback-messages' flag to silence fallback messages#28
pocke merged 2 commits into
lemonade-command:masterfrom
lambdalisue:master

Conversation

@lambdalisue

Copy link
Copy Markdown
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

pocke commented Jan 24, 2018

Copy link
Copy Markdown
Member

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

lambdalisue commented Jan 24, 2018

Copy link
Copy Markdown
Contributor Author

Fair enough. I wait 👍

@raa0121

raa0121 commented Mar 13, 2018

Copy link
Copy Markdown
Member

LGTM

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

pocke commented Mar 14, 2018

Copy link
Copy Markdown
Member

@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