Commit 8a9476f
authored
[REPL] Fix shell completion error on unreadable symlink (#51851)
In macOS there is a file, `/usr/sbin/weakpass_edit` that is a symlink to
a directory that is only readable by `root`. Our REPL shell completion
attempts to call `isfile()` when entering the shell mode and pressing
`w`, throwing an ugly error into the REPL.
This PR fixes the root cause (skipping files that fail the `isfile()`
condition) and adds a test that synthesizes an analogous condition.1 parent 199cac7 commit 8a9476f
2 files changed
+31
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
332 | | - | |
333 | | - | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
334 | 345 | | |
335 | 346 | | |
336 | 347 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1119 | 1119 | | |
1120 | 1120 | | |
1121 | 1121 | | |
1122 | | - | |
1123 | | - | |
1124 | | - | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
1125 | 1130 | | |
1126 | | - | |
1127 | | - | |
1128 | | - | |
1129 | | - | |
1130 | | - | |
1131 | | - | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
1132 | 1135 | | |
| 1136 | + | |
1133 | 1137 | | |
1134 | 1138 | | |
1135 | 1139 | | |
1136 | 1140 | | |
1137 | 1141 | | |
1138 | 1142 | | |
1139 | 1143 | | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
1140 | 1147 | | |
1141 | 1148 | | |
1142 | | - | |
1143 | | - | |
| 1149 | + | |
| 1150 | + | |
1144 | 1151 | | |
1145 | 1152 | | |
1146 | 1153 | | |
| |||
0 commit comments