Bug 754968 - CLI doesn't support arguments with spaces
CLI doesn't support arguments with spaces
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: CLI (Show other bugs)
4.3
Unspecified Unspecified
urgent Severity urgent (vote)
: ---
: RHQ 4.3.0
Assigned To: RHQ Project Maintainer
Mike Foley
:
Depends On:
Blocks: jon3 790074
  Show dependency treegraph
 
Reported: 2011-11-18 07:09 EST by Lukas Krejci
Modified: 2013-08-31 05:56 EDT (History)
1 user (show)

See Also:
Fixed In Version: 4.3.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 790074 (view as bug list)
Environment:
Last Closed: 2013-08-31 05:56:08 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Lukas Krejci 2011-11-18 07:09:36 EST
Description of problem:
CLI is not able to accept arguments containing spaces.

rhq-cli.sh -f script.js "arg with spaces"

will be interpreted as if 3 arguments were passed to the script.

How reproducible:
always

Steps to Reproduce:
1. create script called argcnt.js with a single line "println(args.length);"
2. execute the RHQ CLI with the script and an argument "arg with spaces"
  
Actual results:
the script outputs "3"

Expected results:
"1"
Comment 1 Lukas Krejci 2011-11-18 10:10:31 EST
commit 6dac40e6a8caf01a9ad7d06fde5a511eac545569
Author: Lukas Krejci <lkrejci@redhat.com>
Date:   Fri Nov 18 16:08:13 2011 +0100

    [BZ 754968] - making quoted arguments work with CLI on *nix.
    Windows startup script surprisingly seems to support this ok.
Comment 2 Mike Foley 2011-11-22 11:40:39 EST
verified.

[mfoley@foleymonsterbox1 bin]$ ./rhq-cli.sh -f ../argcnt.js "arg with spaces"
1
[mfoley@foleymonsterbox1 bin]$

Note You need to log in before you can comment on or make changes to this bug.