Page MenuHomePhorge

only update cache file if something changed
ClosedPublic

Authored by avivey on Oct 5 2023, 12:27.

Details

Summary

See Q77. When installing in a read-only location, updating the file is both redundant (nothing changed) and fails.

Make sure to only save the updated file if anything changed.

Test Plan

Run arc lint somewhere, make .phutil_module_cache and src/ read-only, run arc lint again - it should avoid crashing.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

avivey requested review of this revision.Oct 5 2023, 12:27

Tested before/after, thanks :)

Just to clarify the test plan, is the file .phutil_module_cache supposed to be in /src?

This revision is now accepted and ready to land.Oct 11 2023, 05:28

Yeah, the first run of arc lint creates the file, and subsequent runs do not update it.