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

TMP and TEMP env variables are not passed through #8802

Closed
1 task done
cahilfoley opened this issue Jul 22, 2024 · 1 comment
Closed
1 task done

TMP and TEMP env variables are not passed through #8802

cahilfoley opened this issue Jul 22, 2024 · 1 comment
Labels
kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage

Comments

@cahilfoley
Copy link
Contributor

Verify canary release

  • I verified that the issue exists in the latest Turborepo canary release.

Link to code that reproduces this issue

https://github.com/cahilfoley/turborepo-temp-bug

What package manager are you using / does the bug impact?

npm

What operating system are you using?

Mac

Which canary version will you have in your reproduction?

2.0.9 (because canary is currently at 2.0.7)

Describe the Bug

The TMP and TEMP environment variables are not available in child NPM scripts being run by turbo run or turbo watch

Expected Behavior

The TMP and TEMP environment variables should be available in app and package code.

To Reproduce

Try to access the TMP or TEMP environment variables in any app or package script run through turbo in turbo@^2. In the reproduction simply run turbo run example and compare the outputs to your local TMP and TEMP env variables. This also breaks the node os.tmpdir() function.

Additional context

No response

@cahilfoley cahilfoley added kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage owned-by: turborepo labels Jul 22, 2024
chris-olszewski pushed a commit that referenced this issue Jul 22, 2024
### Description
This is required so node scripts and other tools can detect the correct
location to create temporary files and folders. In particular it's
required for the Node.js
[os.tmpdir()](https://nodejs.org/api/os.html#ostmpdir) function.

### Testing Instructions
Create an app or package task that access either the `TMP` or `TEMP`
environment variables and observe that they are passed through
correctly.

This should hopefully resolve this issue #8802
@chris-olszewski
Copy link
Member

Thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage
Projects
None yet
Development

No branches or pull requests

2 participants