paperclipai/paperclip · error · Error
Export cancelled.
Error message
Export cancelled.
What it means
The interactive overwrite prompt for a non-empty export directory was cancelled or answered no, so the export command stops by user choice.
Solutions
- Re-run the export command and confirm the prompt (or pass --yes/--force where supported).
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at cli/src/commands/client/company.ts:1264 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18).
Data as JSON: /api/errors/76e787ed61510d37.
Report an issue: GitHub.
Appendix: source
Thrown at cli/src/commands/client/company.ts:1264
const entries = await readdir(root);
if (entries.length === 0) return;
// --force skips the guard for non-interactive/automated callers (e.g. the
// nightly backup routine, which exports into a git clone that legitimately
// still holds .git and BACKUP-README.md after cleaning tracked content).
if (opts.force) return;
if (!process.stdin.isTTY || !process.stdout.isTTY) {
throw new Error(`Export output directory ${root} already contains files. Re-run interactively, pass --force, or choose an empty directory.`);
}
const confirmed = await p.confirm({
message: `Overwrite existing files in ${root}?`,
initialValue: false,
});
if (p.isCancel(confirmed) || !confirmed) {
throw new Error("Export cancelled.");
}
}
function matchesPrefix(company: Company, selector: string): boolean {
return company.issuePrefix.toUpperCase() === selector.toUpperCase();
}
export function resolveCompanyForDeletion(
companies: Company[],
selectorRaw: string,
by: CompanyDeleteSelectorMode = "auto",
): Company {
const selector = normalizeSelector(selectorRaw);
if (!selector) {
throw new Error("Company selector is required.");
}
const idMatch = companies.find((company) => company.id === selector);View on GitHub (pinned to 120ae5428f)