Page MenuHomePhabricator

Allow bin/config to create config file

Authored by avivey on Sat, Sep 7, 7:18 PM.



See D20779, 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

rP Phabricator
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

avivey created this revision.Sat, Sep 7, 7:18 PM
avivey requested review of this revision.Sat, Sep 7, 7:19 PM
avivey added a comment.Sat, Sep 7, 7:20 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.

epriestley accepted this revision.Sat, Sep 7, 11:01 PM

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

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