devopsgroup-io / vagrant-hostmanager

:pencil: A Vagrant plugin that manages hosts files within a multi-machine environment.
Mozilla Public License 2.0
1.46k stars 148 forks source link

hostmanager starts when "-h" or "--help" flags are issued #272

Open kasiagauza opened 5 years ago

kasiagauza commented 5 years ago

Behavior:

Issuing vagarant hostmanager with "-h" or "--help" updates host files on vm(s). It shouldn't. Help message gets printed, anyway.

Step to reproduce:

vagrant hostmanager -h
   Usage: vagrant hostmanager [vm-name]
    --provider provider          Update machines with the specific provider.
    -h, --help                       Print this help
[vagrant-hostmanager:guest] Updating hosts file on the virtual machine ubuntu-c...
[vagrant-hostmanager:guest] Updating hosts file on the virtual machine ub-mg-1...
[vagrant-hostmanager:guest] Updating hosts file on the virtual machine ub-mg-2...

Environment:

meersjo commented 6 months ago

Bug confirmed to still exist in 1.8.10.

Good thing this plugin doesn't do anything too destructive, because running when -h has been passed is more than a little unexpected.