Commit 2fb79b7
committed
feat: throw error on duplicate module names in workspace
Similar to how pnpm/yarn workspaces error when multiple packages share the
same name, pgpm now throws a DUPLICATE_MODULE error when getModules() or
listModules() encounters multiple modules with the same .control file name.
Previously getModules() returned all matches (causing duplicate entries in
pgpm deploy's interactive prompt) and listModules() silently picked the
shortest path. Both now throw a descriptive error listing the conflicting
paths.1 parent 50a5043 commit 2fb79b7
2 files changed
Lines changed: 26 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
287 | | - | |
| 287 | + | |
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
292 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
293 | 306 | | |
294 | 307 | | |
295 | 308 | | |
296 | | - | |
| 309 | + | |
297 | 310 | | |
298 | 311 | | |
299 | 312 | | |
| |||
318 | 331 | | |
319 | 332 | | |
320 | 333 | | |
321 | | - | |
| 334 | + | |
322 | 335 | | |
323 | 336 | | |
324 | 337 | | |
325 | 338 | | |
326 | 339 | | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
| 340 | + | |
| 341 | + | |
332 | 342 | | |
333 | 343 | | |
334 | 344 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
148 | 155 | | |
149 | 156 | | |
150 | 157 | | |
| |||
0 commit comments