Closed Bug 1262495 Opened 6 years ago Closed 6 years ago

Not possible to run a command without args when it has a subcommand defined

Categories

(Firefox Build System :: Mach Core, enhancement)

enhancement
Not set
normal

Tracking

(firefox48 fixed)

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: ahal, Assigned: ahal)

References

Details

Attachments

(1 file)

For example, lets say we have a command named 'foo' with a subcommand named 'bar'. Running:
./mach foo

will print the subcommand help for bar. This doesn't really make sense, we may want |mach foo| to have its own default behaviour.
For example, say there is a command 'foo' that has a subcommand 'bar'. Prior to this, it was not
possible to run:
./mach foo

as its own independent command. The above would instead print the subcommand help for 'bar'.

Review commit: https://reviewboard.mozilla.org/r/44583/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/44583/
Attachment #8738600 - Flags: review?(gps)
Comment on attachment 8738600 [details]
MozReview Request: Bug 1262495 - [mach] Allow running root commands that have subcommands on their own, r?gps

https://reviewboard.mozilla.org/r/44583/#review42015

I'm not crazy of having commands with sub-commands have their own default/command behavior. But I think it can make sense in limited scenarios.
Attachment #8738600 - Flags: review?(gps) → review+
https://hg.mozilla.org/mozilla-central/rev/563d9fd3012d
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.