Page MenuHomePhabricator

Allow bin/config to create config file
ClosedPublic

Authored by avivey on Sep 7 2019, 7:18 PM.
Tags
None
Referenced Files
F13087182: D20788.diff
Thu, Apr 25, 12:53 AM
F13081517: D20788.diff
Wed, Apr 24, 8:14 PM
Unknown Object (File)
Wed, Apr 24, 5:35 AM
Unknown Object (File)
Sat, Apr 20, 4:55 PM
Unknown Object (File)
Tue, Apr 16, 10:14 PM
Unknown Object (File)
Thu, Apr 11, 8:39 AM
Unknown Object (File)
Sun, Mar 31, 12:39 PM
Unknown Object (File)
Mar 16 2024, 11:21 AM
Subscribers

Details

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.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

avivey requested review of this revision.Sep 7 2019, 7:19 PM

assertWritable checks that the file exists and writable. There's assertWritableFile, but it's private, and it's being called anyway from setKeys.
This might be hiding some other strange conditions, but I couldn't think of any that don't end up just making the file un-writeable.

Oops -- I think this is a reasonable fix, thanks!

This revision is now accepted and ready to land.Sep 7 2019, 11:01 PM
This revision was automatically updated to reflect the committed changes.