Project

General

Profile

Bug #21590

Hammer should end with error when unknown output adapter is selected

Added by Tomáš Strachota over 2 years ago. Updated 10 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Hammer core
Target version:
-
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

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 10 months 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 2 years ago

  • Category set to Hammer core

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

#3 Updated by yifat makias 10 months ago

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

#4 Updated by The Foreman Bot 10 months 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 10 months ago

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

#6 Updated by The Foreman Bot 10 months ago

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

#7 Updated by The Foreman Bot 10 months ago

  • Fixed in Releases hammer-cli-0.19.0 added

#8 Updated by yifat makias 10 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF