🎥 Make videos programmatically with React
Fix Changing the temporary directory to actually have an effect on macOS
Aarni Koskela499e51e78974
diff --git a/packages/docs/docs/miscellaneous/changing-temp-dir.md b/packages/docs/docs/miscellaneous/changing-temp-dir.mdindex 0053dd59b2..1da7ea3931 100644--- a/packages/docs/docs/miscellaneous/changing-temp-dir.md+++ b/packages/docs/docs/miscellaneous/changing-temp-dir.md@@ -7,12 +7,18 @@ crumb: "Advanced configuration"During rendering, Remotion will write items into the temporary directory of the system. This includes rendered frames, uncompressed audio and other artifacts.-If you want to customize the directory that Remotion uses, you can set the `TEMP` environment variable to specify a directory to your liking.+Changing the temporary directory may be useful if the default temporary directory is on a disk that has limited space available.++If you want to customize the directory that Remotion uses, you can set the `TMPDIR` (Linux, macOS) or `TEMP` (Windows) environment variable to specify a directory to your liking.```bash-TEMP=/var/tmp npx remotion render+TMPDIR=/var/tmp npx remotion render```-Remotion will make a new temporary directory in the path that you have specified. This is because the Node.JS API [`os.tmpdir()`](https://github.com/nodejs/node/blob/58431c0e6bb1829b6ccafc5cf6340226c15da790/lib/os.js#L181) is called by Remotion which is checking for environment variables.+Remotion will make a new temporary directory in the path that you have specified.+This is because Remotion uses the the Node.JS [`os.tmpdir()`][tmpdir] API, which checks for these environment variables in priority order:-Changing the temporary directory may be useful if the default temporary directory is on a disk that has limited space available.+* `TMPDIR`, `TMP`, `TEMP` on non-Windows platforms+* `TEMP` and `TMP` on Windows platforms++[tmpdir]: https://github.com/nodejs/node/blob/58431c0e6bb1829b6ccafc5cf6340226c15da790/lib/os.js#L181