Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

temp tailwind.config.js file not removed. #5439

Closed
1 task done
chenxsan opened this issue Nov 19, 2022 · 1 comment · Fixed by #5450
Closed
1 task done

temp tailwind.config.js file not removed. #5439

chenxsan opened this issue Nov 19, 2022 · 1 comment · Fixed by #5450

Comments

@chenxsan
Copy link
Contributor

What version of astro are you using?

1.6.10

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

npm

What operating system are you using?

Linux

Describe the Bug

Making any syntax error in tailwind.config.cjs, you'll see a .temp.xxxx.tailwindcss.config.cjs generated. Fixing that error in tailwind.config.cjs won't clean up that temp file.

I think we need to unlink that temp file in both try and catch here

await fs.unlink(tempConfigPath);

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-1gh3v5?file=tailwind.config.cjs&on=stackblitz

Participation

  • I am willing to submit a pull request for this issue.
@matthewp
Copy link
Contributor

@chenxsan Yes, thank you! Probably this should be done in the finally (maybe in its own try/catch in case it fails). Would you be willing to submit a PR for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants