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)
Apr 15 2026, 4:22 AM
Unknown Object (File)
Apr 11 2026, 5:39 AM
Unknown Object (File)
Mar 10 2026, 9:32 PM
Unknown Object (File)
Feb 13 2026, 5:48 AM
Unknown Object (File)
Jan 16 2026, 3:15 AM
Unknown Object (File)
Jan 15 2026, 3:01 AM
Unknown Object (File)
Jan 14 2026, 3:19 AM
Unknown Object (File)
Dec 21 2025, 5:27 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
Branch
phutil-bug-fix
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 3684
Build 3694: [Placeholder Plan] Wait for 30 Seconds

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.