Page MenuHomePhabricator

Allow bin/config to create config file
ClosedPublic

Authored by avivey on Sep 7 2019, 7:18 PM.
Tags
None
Referenced Files
F18849355: D20788.id49566.diff
Thu, Oct 30, 9:20 AM
F18846442: D20788.diff
Wed, Oct 29, 6:55 PM
F18776703: D20788.id49567.diff
Fri, Oct 10, 11:02 PM
F18710703: D20788.id49566.diff
Sep 29 2025, 2:32 AM
F18656641: D20788.id49567.diff
Sep 22 2025, 11:03 PM
F18610223: D20788.diff
Sep 14 2025, 4:27 AM
F18585124: D20788.id.diff
Sep 11 2025, 2:39 PM
F18570601: D20788.id49567.diff
Sep 10 2025, 3:58 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.