Project

General

Profile

Bug #34724

hammer shell with redirected input prints stty error on RHEL8

Added by Adam Ruzicka 12 months ago. Updated 12 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Other commands
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Team Backlog:
Found in Releases:
In Kanboard:
Red Hat JIRA:

Description

Description of problem:
Just on RHEL8, a hammer shell with input from bash prints error:

stty: invalid argument ‘’

Version-Release number of selected component (if applicable):
Sat7.0 snap 9

How reproducible:
100%

Steps to Reproduce:
echo "product list --organization-id 1" | hammer -u admin -p secret007 shell

Actual results:
..
82 | RHEL for SAP - Update Services for SAP Solutions | | RedHat | 0 |
----|----------------------------------------------------------------------------------|-------------|--------------|--------------|----------------
hammer>
stty: invalid argument ‘’
Try 'stty --help' for more information.

Expected results:
No such stty error

Additional info:
The error happens on RHEL8 only.

Associated revisions

Revision e6268bb3 (diff)
Added by Adam Růžička 12 months ago

Fixes #34724 - Fix hammer shell with pipe as stdin (#360)

Hammer shell tries to store terminal properties with stty -g and restore
them once it is done. This works rather poorly when the input is not a
tty (a pipe). When run in such a way, hammer complains about a couple of
things, depending on platform, possibly caused by different stty
versions.

This should prevent the following errors from showing up:

stty: 'standard input': Inappropriate ioctl for device

stty: invalid argument ‘’
Try 'stty --help' for more information.

History

#1 Updated by Adam Ruzicka 12 months ago

  • Bugzilla link set to 2053843

#2 Updated by The Foreman Bot 12 months ago

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

#3 Updated by The Foreman Bot 12 months ago

  • Fixed in Releases hammer-cli-3.3.0 added

#4 Updated by Anonymous 12 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF