Status

()

defect
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: sstangl, Assigned: sstangl)

Tracking

unspecified
mozilla39
x86_64
Linux
Points:
---

Firefox Tracking Flags

(firefox39 fixed)

Details

Attachments

(2 attachments)

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
https://hg.mozilla.org/mozilla-central/rev/4f8bbef85715
https://hg.mozilla.org/mozilla-central/rev/96aef1037d39
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in before you can comment on or make changes to this bug.