Skip to content

Commit

Permalink
fix: add missing error log
Browse files Browse the repository at this point in the history
  • Loading branch information
Loïc Mangeonjean committed Jul 17, 2024
1 parent f40ad22 commit d48bb57
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/service-override/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d48bb57

Please sign in to comment.