Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15334481
D20779.id49546.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D20779.id49546.diff
View Options
diff --git a/src/applications/config/management/PhabricatorConfigManagementSetWorkflow.php b/src/applications/config/management/PhabricatorConfigManagementSetWorkflow.php
--- a/src/applications/config/management/PhabricatorConfigManagementSetWorkflow.php
+++ b/src/applications/config/management/PhabricatorConfigManagementSetWorkflow.php
@@ -140,11 +140,22 @@
'Wrote configuration key "%s" to database storage.',
$key);
} else {
- $config_source = id(new PhabricatorConfigLocalSource())
- ->setKeys(array($key => $value));
+ $config_source = new PhabricatorConfigLocalSource();
$local_path = $config_source->getReadablePath();
+ try {
+ Filesystem::assertWritable($local_path);
+ } catch (FilesystemException $ex) {
+ throw new PhutilArgumentUsageException(
+ pht(
+ 'Local path "%s" is not writable. This file must be writable '.
+ 'so that "bin/config" can store configuration.',
+ Filesystem::readablePath($local_path)));
+ }
+
+ $config_source->setKeys(array($key => $value));
+
$write_message = pht(
'Wrote configuration key "%s" to local storage (in file "%s").',
$key,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 9, 9:36 AM (3 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7388006
Default Alt Text
D20779.id49546.diff (1 KB)
Attached To
Mode
D20779: Give "bin/config" a friendlier error message if "local.json" is not writable
Attached
Detach File
Event Timeline
Log In to Comment