Page MenuHomePhabricator

bin/config should allow for retrieving local values even if database is not functional
Closed, ResolvedPublic

Description

Currently, if there is no configured database (or it is not functional), then bin/config get <key> will fail. This functionality is useful when automating local configuration settings (such as being able to check values before setting them) without manually parsing the local config file.

There already seems to be a mechanism in PhabricatorConfigManagementGetWorkflow for handling database exceptions and returning an error in the results, except for when instantiating PhabricatorConfigDatabaseSource fails. Simply moving the instantiation of PhabricatorConfigDatabaseSource into the try block solves this issue.