(options)
| 220 | let _instance = null; |
| 221 | |
| 222 | function getSnapshotManager(options) { |
| 223 | const wantedCwd = (options && options.workdir) || process.cwd(); |
| 224 | if (_instance && _instance.workdir === wantedCwd) return _instance; |
| 225 | // cwd changed — abandon old (any open checkpoint is discarded silently) and rebuild |
| 226 | _instance = new SnapshotManager({ |
| 227 | workdir: wantedCwd, |
| 228 | snapshotDir: (options && options.snapshotDir), |
| 229 | disable: (options && options.disable), |
| 230 | autoRollback: (options && options.autoRollback), |
| 231 | }); |
| 232 | return _instance; |
| 233 | } |
| 234 | |
| 235 | function resetSnapshotManager() { |
| 236 | if (_instance) { |
no outgoing calls
no test coverage detected