Remove temp tailwind config file in finally (#5450)

This commit is contained in:
Sam Chen 2022-11-22 01:30:59 +08:00 committed by GitHub
parent d6ece859ed
commit cef33dd841
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View file

@ -0,0 +1,5 @@
---
'@astrojs/tailwind': patch
---
Remove temp tailwind config file in finally

View file

@ -47,10 +47,10 @@ async function getUserConfig(root: URL, configPath?: string, isRestart = false)
cwd: resolvedRoot,
filePath: tempConfigPath,
});
} catch (err) {
console.error(err)
} finally {
await fs.unlink(tempConfigPath);
} catch {
/** file already removed */
}
return {