[SERVER-17167] Shell breaks when a multiline function is input Created: 03/Feb/15 Updated: 18/Sep/15 Resolved: 03/Feb/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | 3.0.0-rc7 |
| Fix Version/s: | 3.0.0-rc8 |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | William Cross | Assignee: | Benety Goh |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Steps To Reproduce: | At the bash prompt:
This gives the output:
Contrast this with:
which gives the output:
Note that this break happened between 2.8.0-rc5 and 3.0.0-rc6. |
||||||||||||
| Participants: | |||||||||||||
| Description |
|
The mongo shell breaks when given a multiline function, either directly in the shell or when piped in. This is a problem because breaking functions into multiple lines can dramatically improve readability, and does not change the fact that they are valid javascript. |
| Comments |
| Comment by Githook User [ 04/Feb/15 ] | ||||
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: Revert " This reverts commit f1d696d46b65dd1f76727b37d85e0c08c291f533. (cherry picked from commit fc14926f9c8256edce8bbd15d439ca34667c6ebb) | ||||
| Comment by Githook User [ 04/Feb/15 ] | ||||
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: Revert " This reverts commit 2d397b55c3207e875b6085944799b3c243ff4cf3. (cherry picked from commit f67e39825ac93c0915db0192d7a35b3d73834388) | ||||
| Comment by Githook User [ 03/Feb/15 ] | ||||
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: Revert " This reverts commit f1d696d46b65dd1f76727b37d85e0c08c291f533. | ||||
| Comment by Githook User [ 03/Feb/15 ] | ||||
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: Revert " This reverts commit 2d397b55c3207e875b6085944799b3c243ff4cf3. | ||||
| Comment by William Cross [ 03/Feb/15 ] | ||||
|
Depends on whitespace within a line, too:
returns the error, but not:
(note the space preceding the braces in the second example) | ||||
| Comment by William Cross [ 03/Feb/15 ] | ||||
|
stennie noted that this may be related to |