-
Notifications
You must be signed in to change notification settings - Fork 85
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
Revise error messages to include Linux debugging help #220
Revise error messages to include Linux debugging help #220
Conversation
$console->line('Start the Docker service:'); | ||
$console->line(' sudo systemctl start docker'); | ||
|
||
if (! $environment->userIsInDockerGroup()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not crazy about this logic in the exception. However, I decided not to throw a unique exception when a user is not in the docker group because it's possible that some environments don't require it. I wanted this message to be a suggestion for why the docker info
command is failing, not a requirement to use Takeout.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally get that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work on this, thanks!
$console->line(''); | ||
|
||
if ($environment->isLinuxOs()) { | ||
$console->line('Verify that the Docker service is running:'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we move Linux, Windows, and Mac into their own protected methods? That'll start to make this a bit more manageable.
$console->line('Start the Docker service:'); | ||
$console->line(' sudo systemctl start docker'); | ||
|
||
if (! $environment->userIsInDockerGroup()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally get that.
|
||
protected function helpForDarwin() | ||
{ | ||
$console = app('console'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mattstauffer is there a way to avoid resolving this in every method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep! As with my suggestions, pass $console
into the method call, and then accept it in each function definition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just quick formatting changes, then we're good. Thanks!
|
||
protected function helpForDarwin() | ||
{ | ||
$console = app('console'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep! As with my suggestions, pass $console
into the method call, and then accept it in each function definition
Co-authored-by: mattstauffer <[email protected]>
Refactored to pass $console, thanks @mattstauffer! |
Thanks @benholmen! |
I just set up Takeout on Ubuntu 20.04 and I'm really pleased - thank you! I ran into a couple of errors and have some suggestions to provide more helpful error messages to Linux users.