1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-29 18:22:41 +01:00

Allow bin/config to create config file

Summary:
See D20779, https://discourse.phabricator-community.org/t/3089. `bin/config set` complains about
missing config file as if it's un-writable.

Test Plan: run `bin/config set` with missing, writable, unwritable conf.json and parent dir.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D20788
This commit is contained in:
Aviv Eyal 2019-09-08 00:16:19 +00:00 committed by avivey
parent 7e2bec9280
commit 318e8ebdac

View file

@ -145,7 +145,7 @@ final class PhabricatorConfigManagementSetWorkflow
$local_path = $config_source->getReadablePath(); $local_path = $config_source->getReadablePath();
try { try {
Filesystem::assertWritable($local_path); $config_source->setKeys(array($key => $value));
} catch (FilesystemException $ex) { } catch (FilesystemException $ex) {
throw new PhutilArgumentUsageException( throw new PhutilArgumentUsageException(
pht( pht(
@ -154,8 +154,6 @@ final class PhabricatorConfigManagementSetWorkflow
Filesystem::readablePath($local_path))); Filesystem::readablePath($local_path)));
} }
$config_source->setKeys(array($key => $value));
$write_message = pht( $write_message = pht(
'Wrote configuration key "%s" to local storage (in file "%s").', 'Wrote configuration key "%s" to local storage (in file "%s").',
$key, $key,