yamadashy/repomix · warning
File processor for "${rawFile.path}" produced empty output;
Error message
File processor for "${rawFile.path}" produced empty output; the file will be packed as empty. Check that the command writes the transformed content to stdout. What it means
A configured file processor exited successfully but wrote nothing to stdout, so processOne warns that the file would silently become empty in the pack. Empty output is still accepted (the file is packed as empty) when it replaces non-empty original content; the warning makes that visible.
Source
Thrown at src/core/file/fileProcessorRun.ts:265
}
let result: RawFile;
let skipped = false;
try {
const content = await deps.runProcessorCommand({
command: processor.command,
content: rawFile.content,
tempFilePath,
timeout,
cwd: rootDir,
});
// A processor that exits 0 but writes nothing to stdout (e.g. a tool that
// edits the temp file in place, or only writes to stderr) would silently
// blank the file. Empty output is still accepted, but warn when it replaces
// non-empty content so the footgun is visible.
if (content === '' && rawFile.content !== '') {
logger.warn(
`File processor for "${rawFile.path}" produced empty output; the file will be packed as empty. ` +
`Check that the command writes the transformed content to stdout.`,
);
}
result = { ...rawFile, content };
} catch (error) {
const message = describeProcessorError(error, timeout);
if (onError !== 'skip') {
aborted = true;
throw new RepomixError(
`File processor failed for "${rawFile.path}".\n` +
` Pattern: ${processor.pattern}\n` +
` Command: ${processor.command}\n` +
` Error: ${message}\n` +
` Set "onError": "skip" on this processor to fall back to the original content instead.`,
);
}
logger.warn(View on GitHub (pinned to f465ad9093)
Solutions
- Fix the processor command to write transformed content to stdout (e.g. use `sed 's/a/b/'` instead of `sed -i 's/a/b/'`).
- If the command only edits in place, wrap it: `cmd "$TMPFILE" >/dev/null && cat "$TMPFILE"` — or switch to a processor that reads stdin and prints stdout.
- Test the command manually: `cat file | <command>` must print the transformed content.
- Remove the processor if it isn't supposed to transform these files; check the pattern isn't too broad.
Example fix
// before: edits in place, stdout empty "command": "sed -i 's/foo/bar/g'" // after: writes to stdout "command": "sed 's/foo/bar/g'"
Defensive patterns
Strategy: validation
Validate before calling
// verify the processor emits to stdout before configuring it
const out = require('child_process').execSync(`cat sample.ts | ${processor.command}`).toString();
if (!out) throw new Error('processor produces no stdout'); Prevention
- Test every processor with `cat file | <command>` and confirm non-empty stdout.
- Prefer stdout-emitting forms (sed without -i, prettier without --write).
- Keep processor patterns narrow so they only match supported files.
When it happens
Trigger: A processor command for a file matching its pattern exits 0 with empty stdout — e.g. a formatter that edits the temp file in place, writes only to stderr, or ignores stdin entirely.
Common situations: Configuring in-place editors (some prettier/gofmt wrappers, sed -i) as processors; commands that require a flag to print to stdout; processors whose pattern matched files the command doesn't support.
Related errors
- File processor for "${rawFile.path}" failed, using original
- In remote mode, --config must be an absolute path to avoid l
- Config file not found at ${argConfigPath}
- Unsupported config file format: ${filePath}
- Instruction file not found at ${instructionPath}
AI-assisted analysis of yamadashy/repomix@f465ad9093 (2026-08-29).
Data as JSON: /api/errors/7be3587189ac12b0.
Report an issue: GitHub.