{"record":{"id":"1962ebacf73bb166","repo":"jdx/mise","slug":"pkgx-bottle-for-did-not-contain","errorCode":null,"errorMessage":"pkgx bottle for {} did not contain {}","messagePattern":"pkgx bottle for (.+?) did not contain (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/backend/pkgx.rs","lineNumber":620,"sourceCode":"        format,\n        &ExtractOptions {\n            strip_components: 0,\n            pr: Some(ctx.pr.as_ref()),\n            preserve_mtime: false,\n        },\n    )?;\n    if tmp\n        .path()\n        .join(&package.name)\n        .join(format!(\"v{}\", package.version))\n        .exists()\n    {\n        file::copy_dir_all(tmp.path(), pkgx_root)?;\n    } else {\n        file::rename(tmp.path(), &prefix)?;\n    }\n    if !prefix.exists() {\n        bail!(\n            \"pkgx bottle for {} did not contain {}\",\n            package.name,\n            prefix.display()\n        );\n    }\n    file::write(package_receipt_path(&prefix), package_receipt(bottle))?;\n    Ok(())\n}\n\nfn package_is_installed(prefix: &Path, bottle: &PkgxPackageInfo) -> Result<bool> {\n    if !prefix.exists() {\n        return Ok(false);\n    }\n    if fs::read_to_string(package_receipt_path(prefix)).ok() == Some(package_receipt(bottle)) {\n        return Ok(true);\n    }\n    file::remove_all(prefix)?;\n    Ok(false)","sourceCodeStart":602,"sourceCodeEnd":638,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/backend/pkgx.rs#L602-L638","documentation":"After downloading and extracting a pkgx bottle (prebuilt package archive), mise expects the resulting prefix directory to exist at the expected install location. This error means the extracted bottle did not produce the expected directory, so the install would be silently broken; mise fails fast instead.","triggerScenarios":"install_package copies or renames the extracted temporary bottle directory into pkgx_root, then checks prefix.exists(); the prefix is missing — the bottle archive layout changed or extraction produced different paths. Called from install_version_ and install_from_locked.","commonSituations":"Upstream pkgx changed bottle directory layout for a package version; truncated/corrupted bottle download whose extraction silently produced an empty or differently-named tree; a stale lock referencing an old bottle shape.","solutions":["Retry the install to re-download a fresh, complete bottle","Update the package to a newer version whose bottle layout matches current expectations","Report/track an upstream pkgx layout change; pin to a version with a known-good bottle"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"# verify the bottle prefix exists after install\n[ -d \"$(mise where pkgx:<pkg> 2>/dev/null)\" ] && echo OK || echo MISSING","typeGuard":null,"tryCatchPattern":"match install_result {\n    Err(e) if e.to_string().contains(\"did not contain\") => {\n        // retry install once; if it persists, pin a different version\n    }\n    r => r?,\n}","preventionTips":["Retry installs that fail once before pinning around them","Keep locks updated so bottle layouts match current expectations","Report persistent layout mismatches as upstream pkgx issues"],"tags":["pkgx","install","packaging"],"backgroundTag":"file-not-found","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}