From cef33dd841b7d4d9437efac54f7e185a40cc3d4b Mon Sep 17 00:00:00 2001 From: Sam Chen Date: Tue, 22 Nov 2022 01:30:59 +0800 Subject: [PATCH] Remove temp tailwind config file in finally (#5450) --- .changeset/thirty-bananas-smell.md | 5 +++++ packages/integrations/tailwind/src/index.ts | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .changeset/thirty-bananas-smell.md diff --git a/.changeset/thirty-bananas-smell.md b/.changeset/thirty-bananas-smell.md new file mode 100644 index 000000000..cf420b596 --- /dev/null +++ b/.changeset/thirty-bananas-smell.md @@ -0,0 +1,5 @@ +--- +'@astrojs/tailwind': patch +--- + +Remove temp tailwind config file in finally diff --git a/packages/integrations/tailwind/src/index.ts b/packages/integrations/tailwind/src/index.ts index fb75e34fe..c344416f3 100644 --- a/packages/integrations/tailwind/src/index.ts +++ b/packages/integrations/tailwind/src/index.ts @@ -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 {