Improve ArgsManager::GetPathArg method added in recent PR #24265, so it is usable more places. This PR starts to use it for the -settings option. This can also be helpful for #24274 which is parsing more path options.
- Add
GetPathArgdefault argument so it is less awkward to use to parse options that have default values. - Fix
GetPathArgnegated argument handling. Return path{} not path{“0”} when path argument is negated. - Add unit tests for default and negated cases
- Move
GetPathArgmethod declaration next toGetArgdeclaration. The two methods are close substitutes for each, so this should help keep them consistent and make them more discoverable.