opral / inlang-sdk

0 stars 0 forks source link

`loadProjectFromDirectory` crashes if file doesn't exist #202

Closed samuelstroschein closed 1 month ago

samuelstroschein commented 1 month ago

Context

If a plugin returns a file path to be read like ./translations/de.json from plugin.toBeImportedFiles() that does not exist, loadProjectFromDirectory crashes.

CleanShot 2024-09-18 at 17.49.06@2x.png

Proposal

Don't crash. THe path comes from the path pattern. If no file exists yet, it's likely not a problem

samuelstroschein commented 1 month ago

closed in https://github.com/opral/monorepo/commit/f786721861f1b0cfb07f92664b92fafa21a95583