From d48bb57e91572913ffb8d76a2d4aa2241f6f5fae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Wed, 17 Jul 2024 15:57:51 +0200 Subject: [PATCH] fix: add missing error log --- src/service-override/files.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/service-override/files.ts b/src/service-override/files.ts index 73a96921..869211b1 100644 --- a/src/service-override/files.ts +++ b/src/service-override/files.ts @@ -963,10 +963,14 @@ export async function initFile (file: URI, content: Uint8Array | string, options // The file already exists, do nothing return } catch (error) { + if (!(error instanceof FileSystemProviderError) || error.code !== FileSystemProviderErrorCode.FileNotFound) { + console.error('Unable to check if file exists', error) + } + // File not found, write it } } - await provider.writeFile(file, content instanceof Uint8Array ? content : encoder.encode(content), { + await provider.writeFile(file, encode(content), { atomic: false, create: true, overwrite: false,