Project

General

Profile

Bug #21590

Hammer should end with error when unknown output adapter is selected

Added by Tomáš Strachota over 5 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Hammer core
Target version:
-
Fixed in Releases:
Found in Releases:
In Kanboard:
Red Hat JIRA:

Description

Hammer defaults to 'base' output adapter if it can't find adapter specified in --output:

hammer --output=unknown user list                                                                                                                                                         
Id:            3
Login:         admin
Name:          Admin User
Email:         root@example.com
Admin:         yes
Last login:    2017/10/20 11:21:39
Authorized by: Internal

Id:            52
Login:         ipa_bob
Name:          Bob Doe
Email:         ipa_bob@ipa.test
Admin:         no
Last login:    2017/07/13 12:36:02
Authorized by: FreeIPA ldap

This is quite confusing behavior, especially when user passes 'yml' instead of the only supported 'yaml'. Both outputs aren't that different at a first glance.

Expected result:
Hammer should end with error instead, informing that the adapter name is unknown and listing the available ones.


Related issues

Related to Hammer CLI - Tracker #2823: Tracker for usability issuesClosed

Associated revisions

Revision 3fcf76dd (diff)
Added by yifat makias over 3 years ago

Fixes #21590 - Added error to wrong --output (#315)

  • Fixes #21590 - Added print_output_type function
  • Fixes #21590 - Added error to wrong --output

History

#1 Updated by Tomáš Strachota over 5 years ago

  • Category set to Hammer core

#2 Updated by Tomáš Strachota over 5 years ago

#3 Updated by yifat makias over 3 years ago

  • Assignee set to yifat makias
  • Status changed from New to Assigned

#4 Updated by The Foreman Bot over 3 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/hammer-cli-foreman/pull/445 added

#5 Updated by The Foreman Bot over 3 years ago

  • Pull request https://github.com/theforeman/hammer-cli-foreman/pull/446 added

#6 Updated by The Foreman Bot over 3 years ago

  • Pull request https://github.com/theforeman/hammer-cli/pull/315 added

#7 Updated by The Foreman Bot over 3 years ago

  • Fixed in Releases hammer-cli-0.19.0 added

#8 Updated by yifat makias over 3 years ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF