You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add batch check command and safety features to CLI
Features added:
- Extended check command to support batch checking: `check <IP> <host1> <host2>...`
- Added --quiet flag for check command (only return exit codes)
- Added --any flag for check command (match ANY instead of ALL hosts)
- Added --backup global flag to create backup before modifying hosts
- Added --safe global flag to detect concurrent modifications
- Added flushHostsfile() helper that implements backup and safety checks
Command updates:
- add, remove, clean now use flushHostsfile() for safe writes
- Backward compatible: single-arg check behavior preserved
Dependencies:
- Updated go.mod to use local hostsfile library with VVV improvements
Exit codes:
- 0: Success (host(s) found or operation completed)
- 1: Check failed (host not found)
- 2: Invalid arguments
This enables VVV vagrant plugin to:
- Check hosts without sudo (read-only operation)
- Only request sudo when hosts are actually missing
0 commit comments