()
| 5 | |
| 6 | // Podman detection |
| 7 | const hasContainerEnv = () => { |
| 8 | try { |
| 9 | fs.statSync('/run/.containerenv'); |
| 10 | return true; |
| 11 | } catch { |
| 12 | return false; |
| 13 | } |
| 14 | }; |
| 15 | |
| 16 | export function isInContainer() { |
| 17 | // TODO: Use `??=` when targeting Node.js 16. |