Project

General

Profile

Feature #11158

Hammer does not report error if configuration file is not found

Added by Bryan Kearney about 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Category:
Hammer core
Target version:
-
Difficulty:
easy
Triaged:
No
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1244821
Description of problem:

Hammer does not abort or warn the user if the configuration file does not exists. Instead it silently ignores it and switches to interactive mode and asks for the Username and password.

# hammer -c /notexistingfile.conf user list
[Foreman] Username: admin
[Foreman] Password for admin:
---|--------|------------|--------------------------------
ID | LOGIN  | NAME       | EMAIL
---|--------|------------|--------------------------------
3  | admin  | Admin User | root@hag.hilti.com
4  | hoici  | hoici      | root@localhost
5  | viewer | viewer     | viewer@li-lc-1578.hag.hilti.com
---|--------|------------|--------------------------------

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. See command above
2.
3.

Actual results:
Interactive input is asked

Expected results:
Abort with an error that the file cannot be found. Alternative is to report a warning and switch to interactive mode

Additional info:

Associated revisions

Revision 169bffe4 (diff)
Added by Tomas Strachota almost 4 years ago

Fixes #11158 - abort when custom config file is not found

Revision 8a70aa0b
Added by Tomas Strachota almost 4 years ago

Merge pull request #177 from tstrachota/config_warning_11158

Fixes #11158 - abort when custom config file is not found

History

#1 Updated by Dominic Cleal about 4 years ago

  • Description updated (diff)
  • Category set to Hammer core

#2 Updated by Tomáš Strachota about 4 years ago

  • Status changed from New to Assigned
  • Assignee set to Tomáš Strachota
  • Difficulty set to trivial

#3 Updated by Tomáš Strachota about 4 years ago

  • Difficulty changed from trivial to easy

#4 Updated by The Foreman Bot about 4 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/hammer-cli/pull/177 added
  • Pull request deleted ()

#5 Updated by Anonymous almost 4 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF