mach run --help shows + characters instead of - characters for command-specific option prefixes

RESOLVED FIXED in mozilla34

Status

enhancement
RESOLVED FIXED
5 years ago
Last year

People

(Reporter: kats, Assigned: kats)

Tracking

unspecified
mozilla34
x86
macOS
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

------------------------------------------------------------------------------
kats@kgupta-air gecko$ mach run --help
usage: mach [global arguments] run [command arguments]

Run the compiled program.

Global Arguments:
  -v, --verbose         Print verbose output.
  -l FILENAME, --log-file FILENAME
                        Filename to write log data to.
  --log-interval        Prefix log line with interval from last message rather
                        than relative time. Note that this is NOT execution
                        time if there are parallel operations.
  --log-no-times        Do not prefix log lines with times. By default, mach
                        will prefix each output line with the time since
                        command start.
  -h, --help            Show this help message.

Command Arguments:
  params           Command-line arguments to pass to the program.
  +remote, +r      Do not pass the -no-remote argument by default.
  +background, +b  Do not pass the -foreground argument by default on Mac
  +profile, +P     Specify the profile to use
------------------------------------------------------------------------------

See the "Command Arguments" section above, where it says "+remote, +r" and the like. That should be "-remote, -r". Attempting to run "mach run +P dummy" doesn't use my "dummy" profile, but "mach run -P dummy" does.
Sorry, I accidentally checked the security-sensitive checkbox before hitting submit, and I can't seem to undo it! :(
Group: core-security
I suppose the remote and background options might actually make sense as + since they are "do not pass ... argument by default" kinds of options (but still, weird). But the profile one should definitely be a - option.
Blocks: 1024471
My naive attempt to fix the argument didn't work for reasons I can't decipher somewhere in the bowels of argparse.
This seems like a better fix, as it aligns the documentation with what the code actually does.
Attachment #8477931 - Flags: review?(gps)
Comment on attachment 8477931 [details] [diff] [review]
Fix documentation

Review of attachment 8477931 [details] [diff] [review]:
-----------------------------------------------------------------

I think this will work. But profile handling for these commands has always been finicky. Be prepared for unexpected breakage.
Attachment #8477931 - Flags: review?(gps) → review+
https://hg.mozilla.org/mozilla-central/rev/62e8be7789a3
Assignee: nobody → bugmail.mozilla
Target Milestone: --- → mozilla34
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.