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)
Thu, Jan 2, 2:43 AM
Unknown Object (File)
Wed, Jan 1, 4:13 PM
Unknown Object (File)
Thu, Dec 26, 9:35 AM
Unknown Object (File)
Dec 14 2024, 5:43 PM
Unknown Object (File)
Dec 14 2024, 12:51 PM
Unknown Object (File)
Dec 6 2024, 3:22 PM
Unknown Object (File)
Nov 28 2024, 8:18 AM
Unknown Object (File)
Nov 27 2024, 8:36 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.