Project

General

Profile

Actions

Feature #11158

closed

Hammer does not report error if configuration file is not found

Added by Bryan Kearney over 8 years ago. Updated over 8 years ago.

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

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:

Actions #1

Updated by Dominic Cleal over 8 years ago

  • Description updated (diff)
  • Category set to Hammer core
Actions #2

Updated by Tomáš Strachota over 8 years ago

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

Updated by Tomáš Strachota over 8 years ago

  • Difficulty changed from trivial to easy
Actions #4

Updated by The Foreman Bot over 8 years ago

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

Updated by Anonymous over 8 years ago

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

Also available in: Atom PDF