Commit c2dc7b8
committed
refactor(project): Always close CacheManager in BuildServer destroy
The active build promise can reject (e.g. when Cache=Force detects a stale
cache and throws). When destroy() awaited that promise, the throw skipped
the closeCacheManager() call below, leaving the SQLite cache.db handle
open. On Windows this caused subsequent tests to fail with EBUSY when
fs.rm tried to remove the buildCache directory.
Wrap the active-build await in try/finally so the cache manager is
released even when the build rejected.1 parent 8b9933b commit c2dc7b8
1 file changed
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
159 | | - | |
160 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
161 | 168 | | |
162 | | - | |
163 | 169 | | |
164 | 170 | | |
165 | 171 | | |
| |||
0 commit comments