{"record":{"id":"4a79f2f5085e55df","repo":"affaan-m/ECC","slug":"nasiko-uninstall-requires-explicit-yes-consent","errorCode":null,"errorMessage":"Nasiko uninstall requires explicit --yes consent.","messagePattern":"Nasiko uninstall requires explicit --yes consent\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/lib/nasiko-release.js","lineNumber":308,"sourceCode":"    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 };\n    (dependencies.writeMetadata || writeMetadataExclusive)(metadataPath, metadata);\n    metadataOwned = true;\n    return { ...plan, dryRun: false, installed: true, reused: false, artifactDigest: layer.digest };\n  } catch (error) {\n    if (metadataOwned) fs.rmSync(metadataPath, { force: true });\n    if (destinationOwned) fs.rmSync(destination, { force: true });\n    throw error;\n  } finally { releaseLock(); }\n}\n\nfunction uninstallNasiko(options = {}, dependencies = {}) {\n  const version = options.version || 'v0.1.0';\n  const release = getQualifiedRelease(version, dependencies.platform || process.platform, dependencies.arch || process.arch);\n  const installDirectory = validateInstallDirectory(options.installDir || defaultInstallDirectory(release, dependencies.environment || process.env, dependencies.homeDirectory || os.homedir()));\n  const destination = path.join(installDirectory, release.binaryName);\n  const plan = { dryRun: Boolean(options.dryRun), version, destination };\n  if (options.dryRun) return plan;\n  if (!options.yes) throw new Error('Nasiko uninstall requires explicit --yes consent.');\n  if (!fs.existsSync(installDirectory)) return { ...plan, dryRun: false, removed: false };\n  assertPrivateInstallDirectory(installDirectory);\n  const releaseLock = acquireLifecycleLock(installDirectory);\n  const metadataPath = metadataPathFor(destination);\n  const suffix = `${process.pid}-${crypto.randomBytes(6).toString('hex')}`;\n  const binaryTombstone = `${destination}.remove-${suffix}`;\n  const metadataTombstone = `${metadataPath}.remove-${suffix}`;\n  let binaryStaged = false;\n  let metadataStaged = false;\n  const rename = dependencies.rename || fs.renameSync;\n  try {\n    const status = (dependencies.inspectInstalled || inspectInstalledNasiko)(destination);\n    if (!status.installed) return { ...plan, dryRun: false, removed: false };\n    if (!status.qualified || status.version !== version) throw new Error('Refusing to remove an unqualified or modified Nasiko executable.');\n    rename(destination, binaryTombstone);\n    binaryStaged = true;\n    rename(metadataPath, metadataTombstone);\n    metadataStaged = true;","sourceCodeStart":290,"sourceCodeEnd":326,"githubUrl":"https://github.com/affaan-m/ECC/blob/06c5e118c4d3e6c3b7f9445f973a2194c82de193/scripts/lib/nasiko-release.js#L290-L326","documentation":"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.","triggerScenarios":"Thrown at scripts/lib/nasiko-release.js:308 when the library encounters an invalid state.","commonSituations":"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.","solutions":["Provide a value that satisfies the validation: Nasiko uninstall requires explicit --yes consent.","Check the calling command or configuration for the reported field and correct it, then retry.","Run the command with --help to review the expected input shape and allowed values."],"exampleFix":"Correct the invalid input so that the following holds: Nasiko uninstall requires explicit --yes consent.","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"06c5e118c4d3e6c3b7f9445f973a2194c82de193","analyzedAt":"2026-08-18T11:27:13.915Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}