Bug 829309

Summary: [CLI] String assignment not possible
Product: [Other] RHQ Project Reporter: Lukas Krejci <lkrejci>
Component: CLIAssignee: John Sanda <jsanda>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4.4CC: hrupp, jsanda, jshaughn
Target Milestone: ---   
Target Release: RHQ 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-01 10:10:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 824129, 826604    

Description Lukas Krejci 2012-06-06 12:49:43 UTC
Description of problem:
In the interactive CLI, the following code breaks:

var a = "whatever";

With:

ReferenceError: "whatever" is not defined. 
var a = whatever ; 
^

This seems to me like we parsed away the quotes before we submit the line to the javascript interpreter.

Version-Release number of selected component (if applicable):
4.5.0-SNAPSHOT

How reproducible:
always

Steps to Reproduce:
1. on CLI commandline do:
var a = "whatever";
  
Actual results:
Error as above

Expected results:
assignment succeeds

Additional info:
This is not limited to assignments - any quoted literal (either single or double quoted) seems to be unqouted before interpreted.

Additionaly, this is NOT present in JON 3.1.0.CR2 (CR3 contains no change in CLI so I'd assume it is not present there either)

Comment 1 John Sanda 2012-06-06 13:41:26 UTC
This is a regression caused by the work I did for bug 826604. I will make this bug a blocker for bug 826604.

Comment 2 John Sanda 2012-06-06 18:34:24 UTC
I pushed a fix to master. The parsing changes only take effect for the script arguments.

commit hash: 5e8863403

Comment 3 Heiko W. Rupp 2013-09-01 10:10:56 UTC
Bulk closing of items that are on_qa and in old RHQ releases, which are out for a long time and where the issue has not been re-opened since.