affaan-m/ECC · error · Error

Nasiko uninstall requires explicit --yes consent.

Error message

Nasiko uninstall requires explicit --yes consent.

What it means

Generic guard in the Nasiko release lifecycle module, raised during uninstall flows when the caller attempts a destructive uninstall without explicit --yes consent. The lifecycle lock/cleanup helpers only run destructive removal after consent is confirmed.

Source

Thrown at scripts/lib/nasiko-release.js:308

    const metadata = { version, platform: release.os, architecture: release.arch, manifestDigest: release.manifestDigest, artifactDigest: layer.digest, binaryDigest: release.binaryDigest, installedPath: destination, license: release.license, sourceUrl: release.sourceUrl };
    (dependencies.writeMetadata || writeMetadataExclusive)(metadataPath, metadata);
    metadataOwned = true;
    return { ...plan, dryRun: false, installed: true, reused: false, artifactDigest: layer.digest };
  } catch (error) {
    if (metadataOwned) fs.rmSync(metadataPath, { force: true });
    if (destinationOwned) fs.rmSync(destination, { force: true });
    throw error;
  } finally { releaseLock(); }
}

function uninstallNasiko(options = {}, dependencies = {}) {
  const version = options.version || 'v0.1.0';
  const release = getQualifiedRelease(version, dependencies.platform || process.platform, dependencies.arch || process.arch);
  const installDirectory = validateInstallDirectory(options.installDir || defaultInstallDirectory(release, dependencies.environment || process.env, dependencies.homeDirectory || os.homedir()));
  const destination = path.join(installDirectory, release.binaryName);
  const plan = { dryRun: Boolean(options.dryRun), version, destination };
  if (options.dryRun) return plan;
  if (!options.yes) throw new Error('Nasiko uninstall requires explicit --yes consent.');
  if (!fs.existsSync(installDirectory)) return { ...plan, dryRun: false, removed: false };
  assertPrivateInstallDirectory(installDirectory);
  const releaseLock = acquireLifecycleLock(installDirectory);
  const metadataPath = metadataPathFor(destination);
  const suffix = `${process.pid}-${crypto.randomBytes(6).toString('hex')}`;
  const binaryTombstone = `${destination}.remove-${suffix}`;
  const metadataTombstone = `${metadataPath}.remove-${suffix}`;
  let binaryStaged = false;
  let metadataStaged = false;
  const rename = dependencies.rename || fs.renameSync;
  try {
    const status = (dependencies.inspectInstalled || inspectInstalledNasiko)(destination);
    if (!status.installed) return { ...plan, dryRun: false, removed: false };
    if (!status.qualified || status.version !== version) throw new Error('Refusing to remove an unqualified or modified Nasiko executable.');
    rename(destination, binaryTombstone);
    binaryStaged = true;
    rename(metadataPath, metadataTombstone);
    metadataStaged = true;

View on GitHub (pinned to 06c5e118c4)

Solutions

  1. Provide a value that satisfies the validation: Nasiko uninstall requires explicit --yes consent.
  2. Check the calling command or configuration for the reported field and correct it, then retry.
  3. Run the command with --help to review the expected input shape and allowed values.

Example fix

Correct the invalid input so that the following holds: Nasiko uninstall requires explicit --yes consent.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at scripts/lib/nasiko-release.js:308 when the library encounters an invalid state.

Common situations: Raised when input validation fails because: Nasiko uninstall requires explicit --yes consent.. Typically caused by a missing, malformed, or out-of-range argument or configuration value.


AI-assisted analysis of affaan-m/ECC@06c5e118c4 (2026-08-18). Data as JSON: /api/errors/4a79f2f5085e55df. Report an issue: GitHub.