Commit 5f78c16
committed
refactor(config): use safeMkdirSync for directory creation
Replace manual EEXIST error handling with safeMkdirSync from
@socketsecurity/lib/fs. This simplifies the code and ensures
consistent error handling for directory creation.
Changes:
- Import safeMkdirSync from @socketsecurity/lib/fs
- Replace try-catch blocks around mkdirSync with safeMkdirSync calls
- Remove duplicate EEXIST error handling code
Benefits:
- Cleaner, more maintainable code
- Consistent error handling across the codebase
- Automatic handling of race conditions in concurrent scenarios
Dependencies:
- Requires @socketsecurity/lib with safeMkdirSync support
(committed in socket-lib: feat(fs): add safeMkdir and safeMkdirSync)1 parent 3be7e06 commit 5f78c16
2 files changed
+5
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
| 123 | + | |
131 | 124 | | |
132 | 125 | | |
133 | 126 | | |
| |||
351 | 344 | | |
352 | 345 | | |
353 | 346 | | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
| 347 | + | |
362 | 348 | | |
363 | 349 | | |
364 | 350 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments