@theholocron/cli 5.0.0-alpha.464 → 5.0.0-alpha.465
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/dist/cli.mjs +3 -2
- package/dist/cli.mjs.map +1 -1
- package/package.json +11 -11
package/dist/cli.mjs
CHANGED
|
@@ -28536,7 +28536,8 @@ async function runSyncRequests(input) {
|
|
|
28536
28536
|
const pending = [...plans.values()].reduce((sum, plan) => sum + (writable(plan) ? outOfDate(plan).length : 0), 0);
|
|
28537
28537
|
const planned = targets.filter((target) => plans.has(target.provider));
|
|
28538
28538
|
const toWrite = planned.filter((target) => writable(plans.get(target.provider)));
|
|
28539
|
-
const
|
|
28539
|
+
const writing = !dryRun && !check;
|
|
28540
|
+
const write = writing && pending > 0;
|
|
28540
28541
|
if (write && !input.yes) {
|
|
28541
28542
|
if (!(input.interactive ?? Boolean(process.stdin.isTTY))) throw new NonInteractiveError(`\`sync requests\` writes ${pending} file(s); pass --yes to run it without asking, or --dry-run to preview`);
|
|
28542
28543
|
if (!await (input.confirm ?? ((message) => confirm({
|
|
@@ -28553,7 +28554,7 @@ async function runSyncRequests(input) {
|
|
|
28553
28554
|
const listed = [];
|
|
28554
28555
|
for (const { tool, provider, collectionFiles, envFiles } of planned) {
|
|
28555
28556
|
let result = plans.get(provider);
|
|
28556
|
-
if (
|
|
28557
|
+
if (writing && writable(result)) try {
|
|
28557
28558
|
result = await tool.workspace({
|
|
28558
28559
|
collectionFiles,
|
|
28559
28560
|
envFiles,
|