@bastani/atomic 0.5.7-0 → 0.5.8-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
*
|
|
26
26
|
* Failures are collected and reported as a summary at the end, but never
|
|
27
27
|
* abort the run — partial setup matches the production installer's
|
|
28
|
-
* "best-effort" semantics. The marker is written
|
|
29
|
-
*
|
|
30
|
-
*
|
|
28
|
+
* "best-effort" semantics. The marker is only written when every step
|
|
29
|
+
* succeeds; on partial failure the next launch re-runs all steps (they
|
|
30
|
+
* are idempotent, so re-running already-succeeded steps is harmless).
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
33
|
import { join } from "node:path";
|
|
@@ -109,18 +109,21 @@ export async function autoSyncIfStale(): Promise<void> {
|
|
|
109
109
|
],
|
|
110
110
|
]);
|
|
111
111
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
//
|
|
115
|
-
|
|
112
|
+
const failures = results.filter((r) => !r.ok);
|
|
113
|
+
|
|
114
|
+
// Only write the marker when every step succeeded. On partial failure
|
|
115
|
+
// the next launch will re-run all steps — they're idempotent, so
|
|
116
|
+
// re-running already-succeeded steps is cheap and harmless.
|
|
117
|
+
if (failures.length === 0) {
|
|
118
|
+
await markSynced();
|
|
119
|
+
}
|
|
116
120
|
|
|
117
121
|
displayBlockBanner();
|
|
118
122
|
printSummary(results);
|
|
119
123
|
|
|
120
|
-
const failures = results.filter((r) => !r.ok);
|
|
121
124
|
if (failures.length > 0) {
|
|
122
125
|
console.log(
|
|
123
|
-
`\n ${COLORS.dim}
|
|
126
|
+
`\n ${COLORS.dim}Setup will retry on next launch. To retry now, re-run your command.${COLORS.reset}\n`,
|
|
124
127
|
);
|
|
125
128
|
} else {
|
|
126
129
|
console.log(
|