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

fix: workaround for pnpm and TMPDIR #123

Merged
merged 6 commits into from
Mar 6, 2023
Merged

fix: workaround for pnpm and TMPDIR #123

merged 6 commits into from
Mar 6, 2023

Conversation

dargmuesli
Copy link
Contributor

@dargmuesli dargmuesli commented Feb 28, 2023

Resolves #120

Workaround for pnpm setting an incorrect TMPDIR. See pnpm/pnpm#6140

Thinking about it a bit more I worry that introducing this workaround also prevents people from making use of their custom TMPDIR - if there is one. I think that more people run nuxt prepare using pnpm in the respective hook, though, than people set TMPDIR themself. So I also added that JITI_TMPDIR_KEEP can be set to a truthy value to disable this workaround for people who'd like to keep their TMPDIR.

Workaround for pnpm setting an incorrect `TMPDIR`.
Set `JITI_TMPDIR_KEEP` to a truthy value to disable this workaround.
pnpm/pnpm#6140
#120
src/utils.ts Outdated Show resolved Hide resolved
src/utils.ts Outdated Show resolved Hide resolved
src/utils.ts Outdated Show resolved Hide resolved
src/utils.ts Outdated Show resolved Hide resolved
@dargmuesli
Copy link
Contributor Author

I've added tests for the new utility function. I'm new to vitest, I hope the tests are well written 😉 I'm always open for feedback.

@pi0 pi0 changed the title fix(jiti): ignore TMPDIR by default fix: workaround for pnpm and TMPDIR Mar 6, 2023
@pi0 pi0 merged commit 1f43c26 into unjs:main Mar 6, 2023
@pi0
Copy link
Member

pi0 commented Mar 6, 2023

Thanks for helping on 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 this pull request may close these issues.

fix(docker): node-jiti directory created in project root
2 participants