Skip to content
Snippets Groups Projects
  1. Oct 08, 2012
  2. Oct 05, 2012
  3. Oct 04, 2012
  4. Oct 03, 2012
  5. Oct 02, 2012
    • Michael Hanselmann's avatar
      cli: Exit with status 0 for --help · d971402f
      Michael Hanselmann authored
      
      This patch is somewhat longer than was anticipated. Before, commands like
      “gnt-instance --help” would exit with the status code 1 (failure). With
      this patch, those commands exits with 0 (success) while unknown commands
      still print the usage screen and exit with status 1.
      
      To achieve this goal without too much ugly code some refactoring on
      cli._ParseArgs was necessary. Printing the version and usage screen was
      separated. At the same time this allows for some unit testing.
      
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarBernardo Dal Seno <bdalseno@google.com>
      d971402f
Loading