()
| 44 | |
| 45 | |
| 46 | function getTmpDir() { |
| 47 | const tmpdirEnv = process.env.TMPDIR; |
| 48 | |
| 49 | if (tmpdirEnv) { |
| 50 | try { |
| 51 | fs.accessSync(tmpdirEnv, fs.constants.R_OK | fs.constants.W_OK); |
| 52 | return tmpdirEnv; |
| 53 | } catch { |
| 54 | // TMPDIR exists but not accessible |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | try { |
| 59 | fs.accessSync("/tmp", fs.constants.R_OK | fs.constants.W_OK); |
| 60 | return "/tmp"; |
| 61 | } catch { |
| 62 | console.log("Error: No usable temporary directory found (TMPDIR or /tmp not accessible)."); |
| 63 | return null; |
| 64 | // process.exit(1); |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | function patchTargetSdkVersion() { |
| 69 | const prefix = execSync('npm prefix').toString().trim(); |
no test coverage detected