Commit eed69ed
committed
fix(fs): add comprehensive error handling for readJson operations
Improve error messages for JSON file reading failures in both async and sync versions:
- ENOENT: File not found with guidance on creating the file
- EACCES/EPERM: Permission denied with access guidance
Users now get actionable guidance instead of generic ENOENT/EACCES errors.
Also fixes formatting in dlx-package.ts for long condition.1 parent 62aa6d1 commit eed69ed
2 files changed
Lines changed: 35 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | | - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
204 | 208 | | |
205 | 209 | | |
206 | 210 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
984 | 984 | | |
985 | 985 | | |
986 | 986 | | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
987 | 1002 | | |
988 | 1003 | | |
989 | 1004 | | |
| |||
1046 | 1061 | | |
1047 | 1062 | | |
1048 | 1063 | | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
1049 | 1079 | | |
1050 | 1080 | | |
1051 | 1081 | | |
| |||
0 commit comments