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)
Mon, Apr 29, 2:38 PM
Unknown Object (File)
Wed, Apr 24, 10:42 PM
Unknown Object (File)
Thu, Apr 11, 1:27 AM
Unknown Object (File)
Mar 28 2024, 11:52 PM
Unknown Object (File)
Mar 13 2024, 11:05 AM
Unknown Object (File)
Feb 8 2024, 8:37 PM
Unknown Object (File)
Jan 28 2024, 8:19 PM
Unknown Object (File)
Jan 26 2024, 10:52 AM
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.