Automattic / hostmgr

A tool for managing macOS VM hosts
Mozilla Public License 2.0
8 stars 3 forks source link

Fix `hostmgr --version` command #34

Closed crazytonyli closed 1 year ago

crazytonyli commented 1 year ago

Changes

This PR fixes two minor issues:

  1. hostmgr --version doesn't print the version.
    $ hostmgr --version
    2022-08-17T16:56:38+1200 debug com.automattic.hostmgr : Starting Up
    Invalid configuration – exiting
  2. argument-parser incorrectly assumes the command is 'host-mgr', which is derived from the type name HostMgr.
    
    $ hostmgr --help
    OVERVIEW: A utility for managing VM hosts

USAGE: host-mgr [--version]

...


## Test instructions
Checkout this PR locally and run the following command.

swift build swift run --skip-build hostmgr --version # Output should be '0.14.0' swift run --skip-build hostmgr --help # Output shows 'hostmgr' as the command, not 'host-mgr'