1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 08:42: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();
try {
Filesystem::assertWritable($local_path);
$config_source->setKeys(array($key => $value));
} catch (FilesystemException $ex) {
throw new PhutilArgumentUsageException(
pht(
@ -154,8 +154,6 @@ final class PhabricatorConfigManagementSetWorkflow
Filesystem::readablePath($local_path)));
}
$config_source->setKeys(array($key => $value));
$write_message = pht(
'Wrote configuration key "%s" to local storage (in file "%s").',
$key,