Closed Bug 1145882 Opened 10 years ago Closed 10 years ago

Add --version to shell

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: sstangl, Assigned: sstangl)

Details

Attachments

(2 files)

mkedlaya_ on IRC had an old JS shell around and wanted to know the build information. Adding --version would be standard and handy. Part 1 fixes a bug where the version information would be omitted from the version string, because $PYTHON isn't yet defined at the point of invocation.
Attachment #8580963 - Flags: review?(mh+mozilla)
Adds -v and --version to the shell as an option with special handling.
Attachment #8580966 - Flags: review?(evilpies)
Comment on attachment 8580966 [details] [diff] [review] Part 2: Add --version. Review of attachment 8580966 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/shell/jsoptparse.cpp @@ +255,5 @@ > > OptionParser::Result > +OptionParser::printVersion(const char *progname) > +{ > + MOZ_ASSERT(ver); Ugh, I guess `version` is really too long. @@ +257,5 @@ > +OptionParser::printVersion(const char *progname) > +{ > + MOZ_ASSERT(ver); > + printf("%s\n", ver); > + return ParseHelp; I would rename this to EarlyExit.
Attachment #8580966 - Flags: review?(evilpies) → review+
Attachment #8580963 - Flags: review?(mh+mozilla) → review+
Assignee: nobody → sstangl
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: