Commit fc3ef84
authored
fix: handle npm install failures gracefully instead of crashing installer (#24)
The installer crashed with exit status 1 when npm install failed during
Phase 3, because unguarded run_command calls allowed set -e to abort the
entire post-install action.
Changes:
- Wrap all npm/yarn install calls in error handlers so failures produce
helpful retry messages instead of crashing the installer
- Replace mapfile with a bash 3.2-compatible while-read loop (macOS
ships bash 3.2 which lacks mapfile, causing an unbound variable crash)
- Use test -s instead of test -f when waiting for .cspell.json in the
container, so the wait detects empty files from partial filesystem sync
- Only emit "Node toolchain installed" when installation actually succeeds
Fixes #231 parent c2d4206 commit fc3ef84
2 files changed
Lines changed: 86 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
435 | 435 | | |
436 | 436 | | |
437 | 437 | | |
438 | | - | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
439 | 443 | | |
440 | 444 | | |
441 | 445 | | |
| |||
467 | 471 | | |
468 | 472 | | |
469 | 473 | | |
470 | | - | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
471 | 478 | | |
472 | 479 | | |
473 | | - | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
474 | 484 | | |
475 | 485 | | |
476 | | - | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
477 | 490 | | |
478 | 491 | | |
479 | 492 | | |
| |||
996 | 1009 | | |
997 | 1010 | | |
998 | 1011 | | |
999 | | - | |
1000 | | - | |
| 1012 | + | |
| 1013 | + | |
1001 | 1014 | | |
1002 | 1015 | | |
1003 | 1016 | | |
| |||
1079 | 1092 | | |
1080 | 1093 | | |
1081 | 1094 | | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
1082 | 1099 | | |
1083 | 1100 | | |
1084 | 1101 | | |
1085 | 1102 | | |
| 1103 | + | |
1086 | 1104 | | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
1087 | 1109 | | |
1088 | 1110 | | |
1089 | | - | |
| 1111 | + | |
1090 | 1112 | | |
1091 | 1113 | | |
1092 | 1114 | | |
| |||
2215 | 2237 | | |
2216 | 2238 | | |
2217 | 2239 | | |
2218 | | - | |
| 2240 | + | |
| 2241 | + | |
| 2242 | + | |
| 2243 | + | |
| 2244 | + | |
| 2245 | + | |
| 2246 | + | |
| 2247 | + | |
| 2248 | + | |
2219 | 2249 | | |
2220 | | - | |
2221 | 2250 | | |
2222 | 2251 | | |
2223 | 2252 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1360 | 1360 | | |
1361 | 1361 | | |
1362 | 1362 | | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
1363 | 1377 | | |
1364 | 1378 | | |
1365 | 1379 | | |
| |||
1401 | 1415 | | |
1402 | 1416 | | |
1403 | 1417 | | |
1404 | | - | |
| 1418 | + | |
1405 | 1419 | | |
1406 | 1420 | | |
1407 | 1421 | | |
| |||
1424 | 1438 | | |
1425 | 1439 | | |
1426 | 1440 | | |
1427 | | - | |
| 1441 | + | |
1428 | 1442 | | |
1429 | 1443 | | |
1430 | 1444 | | |
| |||
1441 | 1455 | | |
1442 | 1456 | | |
1443 | 1457 | | |
1444 | | - | |
| 1458 | + | |
1445 | 1459 | | |
1446 | 1460 | | |
1447 | 1461 | | |
1448 | 1462 | | |
1449 | 1463 | | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
1450 | 1495 | | |
1451 | 1496 | | |
1452 | 1497 | | |
| |||
0 commit comments