windmill-labs/windmill · error · Error
--upload binds ${scriptPath}:${param} more than once.
Error message
--upload binds ${scriptPath}:${param} more than once. What it means
Duplicate-binding guard in resolveUploadArgs: two or more --upload bindings target the same script and the same parameter, which would have the later upload silently clobber the earlier one. The inputs at fault are the repeated --upload <script>:<param>=… entries on the command line for one pipeline run.
Source
Thrown at cli/src/commands/pipeline/pipeline.ts:504
return schema;
};
const args: Record<string, any> = {};
for (const binding of bindings) {
let param = binding.param;
if (!param) {
const params = s3ObjectParams(await loadSchema());
if (params.length === 1) param = params[0];
else if (params.length === 0) {
throw new Error(`${scriptPath} declares no S3Object parameter to bind --upload to.`);
} else {
throw new Error(
`${scriptPath} has multiple S3Object parameters (${params.join(", ")}) — pick one with --upload ${binding.scriptTok}:<param>=${binding.source}`,
);
}
}
if (param in args) {
throw new Error(`--upload binds ${scriptPath}:${param} more than once.`);
}
let obj: { s3: string; storage?: string };
if (binding.source.startsWith("s3://")) {
// Canonical `s3://<storage>/<key>`; keeps named storage (see parseS3Uri).
obj = parseS3Uri(binding.source);
} else {
const buf = await readFile(binding.source);
// Key scoped by script + param so distinct sources sharing a basename
// (across scripts or params) don't clobber each other in the store.
const key = devUploadKey(scriptPath, param, binding.source);
await wmill.fileUpload({
workspace: workspaceId,
fileKey: key,
requestBody: new Blob([buf]) as any,
});
log.info(colors.gray(` ↑ ${binding.source} → s3://${key}`));
obj = { s3: key };
}View on GitHub (pinned to e474e8803c)
Solutions
- Remove the duplicate --upload entry so each param is bound exactly once
- If you meant two different params, fix the param name in one of the bindings
- If you meant two files into two params, give each binding its own explicit :<param>
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at cli/src/commands/pipeline/pipeline.ts:504 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/839ea1ceec74f95c.
Report an issue: GitHub.