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

reduce verbosity of daemon start #5904

Merged
merged 3 commits into from
Jan 9, 2019
Merged

reduce verbosity of daemon start #5904

merged 3 commits into from
Jan 9, 2019

Conversation

Stebalien
Copy link
Member

Also, avoid printing C-c message unless we actually start the daemon:

Now ipfs daemon with no repo prints:

Initializing daemon...
go-ipfs version: 0.4.19-dev-7a9b1716f
Repo version: 7
System version: amd64/linux
Golang version: go1.11.4
Error: no IPFS repo found in /tmp/xyz.
please run: 'ipfs init'

work towards: #5903

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
This isn't an error and 99.999% of users won't care.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
@Stebalien Stebalien requested a review from Kubuxu as a code owner January 8, 2019 03:32
@ghost ghost assigned Stebalien Jan 8, 2019
@ghost ghost added the status/in-progress In progress label Jan 8, 2019
@Stebalien
Copy link
Member Author

I've kept the version information because it's pretty useful but we could try adding some space.

Copy link
Member

@magik6k magik6k left a comment

Choose a reason for hiding this comment

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

I'd also print additional \n after printVersion() - https://github.com/ipfs/go-ipfs/pull/5904/files#diff-54f2c4a5481de30b8ccb59ad5b6588b3L199, would make it even more readable:

Initializing daemon...
go-ipfs version: 0.4.19-dev-7a9b1716f
Repo version: 7
System version: amd64/linux
Golang version: go1.11.4

Error: no IPFS repo found in /tmp/xyz.
please run: 'ipfs init'

The `ipfs init` command prints out a ton of information which can make it hard
to spot errors. Print a newline before these errors

We could do this for every command but there are some tricky edge cases:

1. This would look funny if there's no other output.
2. It might mess break tools parsing the output (not expecting empty lines).

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
@Stebalien
Copy link
Member Author

I've pushed a commit that adds a new line when exiting the daemon command with an error. That way, it doesn't matter where we run into an error, it'll always be clear.

We could do this for all commands but always prepending a newline could look a bit funky.

@Stebalien Stebalien merged commit c8c348b into master Jan 9, 2019
@ghost ghost removed the status/in-progress In progress label Jan 9, 2019
@Stebalien Stebalien deleted the feat/quiet-init branch January 9, 2019 23:26
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