Project

General

Profile

Bug #11275

hammer ... list --search with spaces in arg fails on SCL OS

Added by Dominic Cleal almost 4 years ago. Updated 10 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
RPMs
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

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

Related to Foreman - Bug #11170: foreman-rake: setting complex parameters (arrays, hashes) broken?Closed2015-07-21
Related to Packaging - Feature #8979: Package hammer with ruby193 sclClosed2015-01-15

Associated revisions

Revision bea14a70 (diff)
Added by Dominic Cleal almost 4 years ago

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.

Revision 930d32d9
Added by Dominic Cleal almost 4 years ago

Merge pull request #726 from domcleal/rpm/develop-11275-scl-args

fixes #11275, #11170 - pass spaces/quotes in args through SCL wrappers

History

#1 Updated by Dominic Cleal almost 4 years ago

  • Related to Bug #11170: foreman-rake: setting complex parameters (arrays, hashes) broken? added

#2 Updated by Dominic Cleal almost 4 years ago

  • Related to Feature #8979: Package hammer with ruby193 scl added

#3 Updated by The Foreman Bot almost 4 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 almost 4 years ago

  • Assignee set to Dominic Cleal

#5 Updated by Dominic Cleal over 3 years ago

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

Also available in: Atom PDF