{"record":{"id":"cdfbc41fedf1a240","repo":"jdx/mise","slug":"flatpak-cannot-install-a-pinned-version-pkg","errorCode":null,"errorMessage":"flatpak cannot install a pinned version ('{pkg}')","messagePattern":"flatpak cannot install a pinned version \\('(.+?)'\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/packages/flatpak.rs","lineNumber":148,"sourceCode":"            .args(args)\n            .stdin(Stdio::null())\n            .stdout(Stdio::piped())\n            .stderr(Stdio::piped())\n            .output()\n            .await?;\n        if !output.status.success() {\n            let stderr = String::from_utf8_lossy(&output.stderr);\n            bail!(\"flatpak list failed: {}\", stderr.trim());\n        }\n        Ok(parse_flatpak_list(\n            &String::from_utf8_lossy(&output.stdout),\n            pkgs,\n        ))\n    }\n\n    async fn install(&self, pkgs: &[PackageRequest], opts: &InstallOpts) -> Result<()> {\n        if let Some(pkg) = pkgs.iter().find(|pkg| pkg.version.is_some()) {\n            bail!(\"flatpak cannot install a pinned version ('{pkg}')\");\n        }\n        let mut args = vec![\n            \"install\".to_string(),\n            self.scope_arg().to_string(),\n            \"--noninteractive\".to_string(),\n        ];\n        args.extend(pkgs.iter().map(|pkg| pkg.name.clone()));\n        if opts.dry_run {\n            miseprintln!(\"flatpak {}\", args.join(\" \"));\n            return Ok(());\n        }\n        run_flatpak(&args, \"install\").await\n    }\n\n    async fn upgrade(&self, pkgs: &[PackageRequest], opts: &InstallOpts) -> Result<()> {\n        if pkgs.is_empty() {\n            return Ok(());\n        }","sourceCodeStart":130,"sourceCodeEnd":166,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/packages/flatpak.rs#L130-L166","documentation":"Request validation in the flatpak manager's install(): a PackageRequest pinned a specific version, but flatpak installs only the current remote version and cannot pin, so mise refuses the request up front instead of silently installing a different version.","triggerScenarios":"Thrown at src/system/packages/flatpak.rs:148 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the version pin and request the app by ID only","Install the pinned version outside mise with `flatpak install appid==version` directly","Choose a manager that supports pinning if exact versions are required"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}