(prefix: string)
| 32 | |
| 33 | const tempDirs: string[] = [] |
| 34 | async function tmp(prefix: string): Promise<string> { |
| 35 | const dir = await mkdtemp(path.join(os.tmpdir(), prefix)) |
| 36 | tempDirs.push(dir) |
| 37 | return dir |
| 38 | } |
| 39 | |
| 40 | const ENV_KEYS = ['ZENNOTES_CONFIG_DIR', 'XDG_CONFIG_HOME', 'APPDATA'] as const |
| 41 | let savedEnv: Record<string, string | undefined> = {} |