Closed Bug 679138 Opened 14 years ago Closed 14 years ago

argv past script argument should not be interpreted as options

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla9

People

(Reporter: cdleary, Assigned: cdleary)

Details

Attachments

(1 file)

Expected behavior: <<EOF print(uneval(arguments)) EOF $ ./js foo.js -q ["-q"]
This also gives us the ability to make a |--| option for people passing |-f| if we cared.
Attachment #553267 - Flags: review?(dvander)
Comment on attachment 553267 [details] [diff] [review] Script arg terminates options. Review of attachment 553267 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/shell/jsoptparse.h @@ +78,5 @@ > > virtual ~Option() = 0; > > + void setTerminatesOptions(bool enabled) { terminatesOptions = enabled; } > + bool getTerminatesOptions() const { return terminatesOptions; } I think this reads better as just "terminatesOptions()" but get is fine too
Attachment #553267 - Flags: review?(dvander) → review+
Whiteboard: [inbound]
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → mozilla9
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: