-
-
Notifications
You must be signed in to change notification settings - Fork 53
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
hostctl appears to not be idempotent when it adds entries for the same domain + ip when run multiple times.
To Reproduce
Run this command multiple times (--uniq doesn't seem to make a difference)
touch /tmp/test-hosts; hostctl add domains test domain1 --ip 127.0.0.1 --host-file /tmp/test-hosts
Current behavior
##################################################################
# Content under this line is handled by hostctl. DO NOT EDIT.
##################################################################
# profile.on test
127.0.0.1 domain1
127.0.0.1 domain1
127.0.0.1 domain1
127.0.0.1 domain1
# end
Expected behavior
When running the command above, /tmp/test-hosts should only contain one uniq entry.
Example of what it should look like
##################################################################
# Content under this line is handled by hostctl. DO NOT EDIT.
##################################################################
# profile.on test
127.0.0.1 domain1
# end
System (please complete the following information):
- OS: Mac
- Version: 10.15.7 (19H15)
Additional context
hostctl --version
hostctl version 1.0.14
lukasmrtvy
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working