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

Issue: Panic on line deletion #21

Closed
areYouLazy opened this issue Jun 22, 2021 · 1 comment
Closed

Issue: Panic on line deletion #21

areYouLazy opened this issue Jun 22, 2021 · 1 comment

Comments

@areYouLazy
Copy link
Owner

areYouLazy commented Jun 22, 2021

Describe the bug
As mentioned here there's a panic on line deletion.
Panic occurs if there's no newline at the end of the file and you try to delete line by hostname.

To Reproduce
Steps to reproduce the behavior:

  1. Delete last empty line from hosts file by hand
  2. Use hosty to delete a line by hostname
  3. Panic

Expected behavior
As per deletion-by-ip, deletion should occur even without empty lines at the end of the file

@areYouLazy
Copy link
Owner Author

Actually this is fixed but while removing by hostnames we're matching every possible hostname (it seams) so the file is cleaned up except for comments

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

No branches or pull requests

1 participant