Commit 0251404
committed
fix(utils): prevent race condition in parallel plugin runs
When running the same plugin for multiple projects in parallel (e.g., via
Nx targets), the timestamp-based directory naming could collide if two
processes started within the same millisecond.
This caused one process to delete the output directory while another was
still using it, leading to failures.
The fix adds process.pid and a random suffix to the directory name,
ensuring uniqueness even when multiple processes run simultaneously.1 parent 1d7ffda commit 0251404
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
0 commit comments