Bug #11275
hammer ... list --search with spaces in arg fails on SCL OS
Difficulty:
Triaged:
Description
When an argument contains spaces (e.g. --search "... ...") then it's not being passed through ruby193-ruby and 'scl' correctly, causing an error:
# hammer puppet-class list --search "name = ntp" Error: too many arguments See: 'hammer puppet-class list --help'
Related issues
Associated revisions
History
#1
Updated by Dominic Cleal over 7 years ago
- Related to Bug #11170: foreman-rake: setting complex parameters (arrays, hashes) broken? added
#2
Updated by Dominic Cleal over 7 years ago
- Related to Feature #8979: Package hammer with ruby193 scl added
#3
Updated by The Foreman Bot over 7 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman-packaging/pull/726 added
- Pull request deleted (
)
#4
Updated by Dominic Cleal over 7 years ago
- Assignee set to Dominic Cleal
#5
Updated by Dominic Cleal over 7 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
fixes #11275, #11170 - pass spaces/quotes in args through SCL wrappers
Changes the ruby193/SCL wrappers to create a temporary file containing
all original arguments from the ruby193-* command and then executes it
via "scl enable". This fixes two quoting-related bugs with these
wrappers.
1. #11170: the "scl enable" command has a bug (RHBZ#1248418) where it
internally uses temporary shell scripts and doesn't escape double
quotes, so JSON strings can't be passed through as arguments.
2. #11275: the ruby-wrappers passed through arguments word-by-word,
causing arguments containing spaces to be split up. It should have
used the special quoted "$@" variable.