theme-tools icon indicating copy to clipboard operation
theme-tools copied to clipboard

Fix the `ThemeLiquidDocsManager` to prevent failures when the language server attempts to update assets in offline mode

Open karreiro opened this issue 2 years ago • 0 comments

When users are offline and initiate the language server, the update fails and overwrites files with the default content, which is undesirable.

While downloading files, it is advisable to persist them in a temporary file and only replace the outdated file with the new one if the download is successful: https://github.com/Shopify/liquid-language-server/blob/5796c5f14c063513f38586f1be7e9fd93f65c26e/packages/node/src/theme-liquid-docs-manager.ts#L65

--

This task is related to https://github.com/Shopify/liquid-language-server/issues/60

karreiro avatar Jun 13 '23 17:06 karreiro