Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/lighthouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,12 @@ int main(int argc, char **argv) {
/* Set up the remote process. */
int32_t to_child_fd, from_child_fd;

char *exec_file = settings.cmd;
char *exec_file;
if(access(settings.cmd, F_OK) == -1) {
exec_file = "/usr/share/lighthouse/cmd.py";
Copy link
Owner

Choose a reason for hiding this comment

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

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;

} else {
exec_file = settings.cmd;
}

if (spawn_piped_process(exec_file, &to_child_fd, &from_child_fd, (char **)cmdargs)) {
fprintf(stderr, "Failed to spawn piped process.\n");
Expand Down