santifer/career-ops · error

Installation requires explicit confirmation. Re-run with…

Error message

Installation requires explicit confirmation. Re-run with `node update-system.mjs apply${updateForce ? ' --force' : ''} --confirm`. A scheduled update check never installs files.

What it means

The apply path of update-system.mjs refuses to modify working-tree files without an explicit --confirm flag. This guards against a scheduled or automatic update check silently installing files; installation must always be a deliberate human action. The error message echoes the exact command to run, including --force if that flag was already present.

Solutions

  1. Re-run the intended command with --confirm: `node update-system.mjs apply --confirm` (or `apply --force --confirm`).
  2. If this came from a scheduled job, change it to run `check` only; checks never install files.
  3. Review pending changes first (`node update-system.mjs check`) before confirming.

Example fix

// before
node update-system.mjs apply
// after
node update-system.mjs apply --confirm
Defensive patterns

Strategy: validation

Validate before calling

const args = process.argv.slice(2);
if (args.includes('apply') && !args.includes('--confirm')) {
  console.error('apply requires --confirm; nothing installed.');
  process.exit(2);
}

Try / catch

try {
  applyUpdate();
} catch (e) {
  if (e.message.includes('requires explicit confirmation')) {
    console.error('Re-run with: node update-system.mjs apply --confirm');
  } else throw e;
}

Prevention

When it happens

Trigger: Running `node update-system.mjs apply` (or `apply --force`) without `--confirm`, or an automated/scheduled update-check flow reaching the install step without confirmation.

Common situations: User ran apply directly instead of answering the interactive prompt; a cron job or scheduled check invoked apply instead of check; scripted automation copied the docs command but dropped --confirm.

Understand the failure class

Background: "--flag is required" and "must specify" CLI errors: how missing-required-flag validation works and how to fix it — this error's family across 20 libraries.

Related errors


AI-assisted analysis of santifer/career-ops@e7abd431fc (2026-09-16). Data as JSON: /api/errors/8729cac68b16033c. Report an issue: GitHub.

Appendix: source

Thrown at update-system.mjs:2099

  assertOwnGitToplevel();
  const local = localVersion();
  // Environment variables are a private one-use channel for the self-reexec;
  // they must not authorize the initial invocation (#2866).
  const legacyReexec = isLegacyReexec();
  const isReexec = consumeReexecMarker() || legacyReexec ||
    (process.argv.includes('--confirm') && process.env.CAREER_OPS_UPDATE_REEXEC === '1');
  const updateForce = process.argv.includes('--force') ||
    (isReexec && process.env.CAREER_OPS_UPDATE_FORCE === '1');
  const updateConfirmed = process.argv.includes('--confirm') ||
    (isReexec && (process.env.CAREER_OPS_UPDATE_CONFIRM === '1' || legacyReexec));
  const initialStatusPaths = new Set(gitStatusEntries().map(entry => entry.path));
  // Backups created by this apply run are expected updater output, not user
  // files the checkout modified. Record only successful copies so an unrelated
  // pre-existing .bak can never receive this exemption.
  const generatedBackupPaths = new Set();

  if (!updateConfirmed) {
    throw new Error(
      `Installation requires explicit confirmation. Re-run with ` +
      `\`node update-system.mjs apply${updateForce ? ' --force' : ''} --confirm\`. ` +
      'A scheduled update check never installs files.',
    );
  }

  // Check for lock
  const lockFile = join(ROOT, '.update-lock');
  if (existsSync(lockFile) && !isReexec) {
    console.error('Update already in progress (.update-lock exists). If stuck, delete it manually.');
    process.exit(1);
  }

  // Create lock
  if (!isReexec) {
    writeFileSync(lockFile, new Date().toISOString());
  }

View on GitHub (pinned to e7abd431fc)