Page MenuHomePhabricator

Allow bin/config to create config file
ClosedPublic

Authored by avivey on Sep 7 2019, 7:18 PM.
Tags
None
Referenced Files
F15601413: D20788.diff
Wed, May 14, 1:36 AM
Unknown Object (File)
Fri, May 9, 8:57 PM
Unknown Object (File)
Wed, May 7, 3:40 PM
Unknown Object (File)
Sun, Apr 27, 2:48 AM
Unknown Object (File)
Fri, Apr 18, 9:10 AM
Unknown Object (File)
Apr 1 2025, 10:03 AM
Unknown Object (File)
Mar 31 2025, 6:08 AM
Unknown Object (File)
Mar 29 2025, 6:27 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
Branch
master
Lint
Lint Passed
Unit
Tests Skipped
Build Status
Buildable 23392
Build 32135: Run Core Tests
Build 32134: arc lint + arc unit

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.