Page MenuHomePhabricator

Prevent error in PhutilArgumentParser when not using standard options
ClosedPublic

Authored by hach-que on Jan 8 2015, 10:25 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 19, 2:12 PM
Unknown Object (File)
Oct 16 2024, 2:36 AM
Unknown Object (File)
Oct 15 2024, 1:55 AM
Unknown Object (File)
Oct 8 2024, 1:33 PM
Unknown Object (File)
Sep 5 2024, 6:18 AM
Unknown Object (File)
Aug 28 2024, 11:29 PM
Unknown Object (File)
Aug 25 2024, 10:42 AM
Unknown Object (File)
Aug 19 2024, 10:41 PM
Subscribers

Details

Summary

This prevents an exception from being raised when PhutilArgumentParser is being used without the standard options. Elsewhere it checks to make sure 'show-standard-options' is an available option before getting it's value, but here it just calls getArg, which causes an exception to be raised.

Test Plan

Saw this occur when hitting this code path in Omni (which doesn't have the standard options for builtins).

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

hach-que retitled this revision from to Prevent error in PhutilArgumentParser when not using standard options.
hach-que updated this object.
hach-que edited the test plan for this revision. (Show Details)
hach-que added a reviewer: epriestley.
epriestley edited edge metadata.
This revision is now accepted and ready to land.Jan 8 2015, 4:42 PM
This revision was automatically updated to reflect the committed changes.