Files
twenty_crm/packages/twenty-server
Niklas Korz 10c9d11e15 Skip front config generation if index isn't writable (#13094)
In certain scenarios, the front directory may not be writable.
When this is the case, writing the patched `index.html` should be
skipped just like when the file does not exist.
For brevity, I have replaced the `existsSync` check with a try-catch
that catches any errors occuring during read
or write of the index file.
The alternative would be `fs.accessSync` with `W_OK`, but that would
still throw an error if the file is not writable so I think it is
reasonable to skip it altogether and go straight for the read and write
attempts.

A specific scenario where the front directory is immutable is NixOS,
where the directory may be located in the read-only nix store.
2025-07-08 13:20:01 +02:00
..
2024-09-18 17:35:08 +02:00
2024-09-20 11:02:52 +02:00
2025-06-27 14:31:27 +02:00