Project

General

Profile

Actions

Bug #14289

closed

Hammer prints deprecation warning when option definitions are loaded

Added by Adam Ruzicka over 8 years ago. Updated about 8 years ago.

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

Description

It should print them when a deprecated flag/option is used


Related issues 1 (0 open1 closed)

Blocks Katello - Refactor #14290: Remove workaround in content-view create testClosedAndrew Kofink03/21/2016Actions
Actions #1

Updated by Adam Ruzicka over 8 years ago

  • Blocks Refactor #14290: Remove workaround in content-view create test added
Actions #2

Updated by Tomáš Strachota over 8 years ago

Adding some more info:

Reproducible with hammer-cli-katello, try:

hammer content-view -h

Warnings are printed from method `handles?(switch)` in OptionDefinition https://github.com/theforeman/hammer-cli/blob/master/lib/hammer_cli/options/option_definition.rb#L55
The method is called also when commands check for existence of options. It should be moved to `take(value)` of Argument::Instance https://github.com/mdub/clamp/blob/master/lib/clamp/attribute/instance.rb#L55 Hammer's OptionDefinition should provide it's own descendant of an argument instance with deprecation tweaks.

Actions #3

Updated by Andrew Kofink about 8 years ago

  • Status changed from New to Resolved
  • Assignee set to Andrew Kofink

Closing, as hammer content-view -h no longer displays the noted deprecation warnings

Actions

Also available in: Atom PDF