Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(error): error when 0 interfaces to listen to are found #69

Merged
merged 4 commits into from
Jan 4, 2020
Merged
Changes from 1 commit
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
3 changes: 3 additions & 0 deletions src/os/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ pub fn get_input(
.map(|iface| get_datalink_channel(iface))
.filter_map(Result::ok)
.collect::<Vec<_>>();
if network_frames.len() == 0 {
failure::bail!("Could not find any network interface to listen to. Try running with sudo");
}

let keyboard_events = Box::new(KeyboardEvents);
let write_to_stdout = create_write_to_stdout();
Expand Down