{"record":{"id":"8b22d79cb568f5bf","repo":"jdx/mise","slug":"unsupported-output-file-type","errorCode":null,"errorMessage":"unsupported output file type: {}","messagePattern":"unsupported output file type: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/task/task_cache.rs","lineNumber":1601,"sourceCode":"            metadata\n                .modified()\n                .ok()\n                .and_then(|m| m.duration_since(UNIX_EPOCH).ok())\n                .map(|d| d.as_secs() as i64)\n                .unwrap_or(0),\n        );\n        if metadata.file_type().is_symlink() {\n            header.set_size(0);\n            archive.append_link(&mut header, &rel, fs::read_link(&abs)?)?;\n        } else if metadata.is_dir() {\n            header.set_size(0);\n            archive.append_data(&mut header, &rel, std::io::empty())?;\n        } else if metadata.is_file() {\n            header.set_size(metadata.len());\n            archive.append_data(&mut header, &rel, File::open(&abs)?)?;\n            restored_bytes = restored_bytes.saturating_add(metadata.len());\n        } else {\n            bail!(\"unsupported output file type: {}\", rel.display());\n        }\n    }\n    let encoder = archive.into_inner()?;\n    encoder.finish()?;\n    Ok(restored_bytes)\n}\n\n#[cfg(unix)]\nfn metadata_mode(metadata: &fs::Metadata) -> u32 {\n    use std::os::unix::fs::PermissionsExt;\n    metadata.permissions().mode()\n}\n\n#[cfg(not(unix))]\nfn metadata_mode(metadata: &fs::Metadata) -> u32 {\n    if metadata.permissions().readonly() {\n        0o444\n    } else {","sourceCodeStart":1583,"sourceCodeEnd":1619,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/task/task_cache.rs#L1583-L1619","documentation":"write_archive packages task outputs into a zstd-compressed tar for the cache. It supports three entry types: symlinks, directories, and regular files, chosen via symlink_metadata. Anything else (on Unix: FIFOs, sockets, device files) has no tar encoding path in this code, so mise bails naming the offending relative path rather than silently dropping the output.","triggerScenarios":"Caching a task whose output tree contains a special file — a named pipe (mkfifo), unix socket, or device node — matched by the task's outputs patterns; encountered while iterating entries during cache save when the file_type is neither symlink, dir, nor file.","commonSituations":"Build tools or test runners that create sockets/FIFOs inside the output directory (e.g. dev servers leaving .sock files); test suites creating pipes under a captured outputs glob like tmp/**; a glob pattern accidentally including a runtime pipe or socket.","solutions":["Exclude the special file from outputs: narrow the glob (e.g. dist/**/*.js instead of dist/**)","Delete the FIFO/socket/device file from the output dir before the task finishes, or have the tool write it elsewhere","If the pipe/socket is created at runtime, configure the tool to place it outside the cached output directory"],"exampleFix":"// before (mise.toml)\n[tasks.dev]\noutputs = [\"run/\"]   # run/ contains server.sock\n// after\n[tasks.dev]\noutputs = [\"run/**/*.js\"]","handlingStrategy":"validation","validationCode":"# ensure no FIFOs/sockets/devices inside output dirs before caching\nfind run/ ! -type f ! -type d ! -type l -print","typeGuard":null,"tryCatchPattern":"// rust: pre-scan outputs and skip/flag special files before write_archive\nfor entry in WalkDir::new(&abs_root) {\n    let md = entry?.file_type();\n    if !(md.is_file() || md.is_dir() || md.is_symlink()) {\n        eprintln!(\"skipping non-regular output: {:?}\", entry?.path());\n    }\n}","preventionTips":["Scope output globs to regular files/dirs the build actually produces","Clean stray sockets/pipes from output dirs at the end of the task script","Configure servers/test tools to place sockets outside cached directories"],"tags":["task-cache","tar-archive","file-types","mise-tasks"],"backgroundTag":"unsupported-operation","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}