Currently c hosts get {host} will return multiple IPs if found in your /etc/hosts record. This PR adds a -l flag to allow you to only return the last one if required (which mimics the natural selection your OS makes from /etc/hosts).
Verification and testing
Verification
These are the steps to demonstrate the problem being solved:
[ ] Edit your /etc/hosts file and duplicate a line.
[ ] In ~Developer/cli execute node bin/c-hosts-get.js {domain}.
[ ] You should see multiple lines returned (likely the same IP).
Testing
[ ] Pull down this PR.
[ ] In ~Developer/cli execute node bin/c-hosts-get.js -l {domain}.
Currently
c hosts get {host}
will return multiple IPs if found in your/etc/hosts
record. This PR adds a-l
flag to allow you to only return the last one if required (which mimics the natural selection your OS makes from/etc/hosts
).Verification and testing
Verification
These are the steps to demonstrate the problem being solved:
/etc/hosts
file and duplicate a line.~Developer/cli
executenode bin/c-hosts-get.js {domain}
.Testing
~Developer/cli
executenode bin/c-hosts-get.js -l {domain}
.Deployment