Fix for missing cmd.py in default config that leads to a segfault#91
Open
and3rson wants to merge 3 commits intoemgram769:masterfrom
Open
Fix for missing cmd.py in default config that leads to a segfault#91and3rson wants to merge 3 commits intoemgram769:masterfrom
and3rson wants to merge 3 commits intoemgram769:masterfrom
Conversation
Author
|
Any updates? :) |
emgram769
requested changes
Jul 29, 2017
| char *exec_file = settings.cmd; | ||
| char *exec_file; | ||
| if(access(settings.cmd, F_OK) == -1) { | ||
| exec_file = "/usr/share/lighthouse/cmd.py"; |
Owner
There was a problem hiding this comment.
this isn't particularly informative/portable. perhaps mimic lines 716-718? something like this:
fprintf(stderr, "No 'cmd' set, please edit your lighthouserc or run lighthouse-install");
exit_code = 1;
return exit_code;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently there's a bug that leads to crash when there's no file
~/.config/lighthouse/cmd.py:This pull request fixes it by checking if file exists and falling back to the default one within
/usr/share/lighthouse