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

cmd/svc/lock: check config dir and file existence #370

Merged
merged 1 commit into from
Apr 5, 2018

Conversation

lanzafame
Copy link
Contributor

Resolves #343.

@GitCop
Copy link

GitCop commented Apr 3, 2018

There were the following issues with your Pull Request

  • Commit: 26d40d2
  • Invalid signoff. Commit message must end with
    License: MIT
    Signed-off-by:

Guidelines are available at https://github.com/ipfs/ipfs-cluster/blob/master/contribute.md


This message was auto-generated by https://gitcop.com

@ghost ghost assigned lanzafame Apr 3, 2018
@ghost ghost added the status/in-progress In progress label Apr 3, 2018
License: MIT
Signed-off-by: Adrian Lanzafame <adrianlanzafame92@gmail.com>
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 67.334% when pulling 271c743 on fix/svc/init/lock into bebc486 on master.


func (l *lock) checkConfigExists() error {
if _, err := os.Stat(l.path); os.IsNotExist(err) {
logger.Error("ipfs-cluster-service config hasn't been initialized.\nPlease run ipfs-cluster-service init")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if I'm 100% behind line breaks in a log message (considering we don't worry about line length anywhere). Any arguments to support it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not running ipfs-cluster-service init is a common newcomer error (aka me 😛 ) and so making it more readable was the thought behind it. Happy to take it out.

@hsanjuan hsanjuan merged commit 95ae174 into master Apr 5, 2018
@ghost ghost removed the status/in-progress In progress label Apr 5, 2018
@hsanjuan hsanjuan deleted the fix/svc/init/lock branch April 5, 2018 07:23
@hsanjuan hsanjuan mentioned this pull request Apr 5, 2018
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.

4 participants