mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
14 lines
310 B
TypeScript
14 lines
310 B
TypeScript
|
import * as os from 'os';
|
||
|
|
||
|
/**
|
||
|
* Gets the temporary directory, either from the environmental variable
|
||
|
* `PUPPETEER_TMP_DIR` or the `os.tmpdir`.
|
||
|
*
|
||
|
* @returns The temporary directory path.
|
||
|
*
|
||
|
* @internal
|
||
|
*/
|
||
|
export const tmpdir = (): string => {
|
||
|
return process.env['PUPPETEER_TMP_DIR'] || os.tmpdir();
|
||
|
};
|