Dashboard › publish › CRAFT_STATE_FILE_PATH existence
01a0895a-0cb3-7d4f-861c-feb6d6af36dbAlways guard Craft-state reads with fs.existsSync(CRAFT_STATE_FILE_PATH). Reading directly looks simpler, but missing state is an expected path when publication has not produced a state file; the guard preserves cleanup, including removal of accepted, instead of failing on ENOENT.