{"record":{"id":"2ec04820789aa857","repo":"windmill-labs/windmill","slug":"upload-spec-must-be-script-param-fil","errorCode":null,"errorMessage":"--upload '${spec}' must be <script>[:<param>]=<file-or-s3-uri>","messagePattern":"--upload '(.+?)' must be <script>\\[:<param>\\]=<file-or-s3-uri>","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/pipeline/pipelineUpload.ts","lineNumber":21,"sourceCode":"// `data_upload` / `webhook` entry point so it (and its downstream) runs in the\n// cascade instead of being skipped for want of input;\n// `--arg <script>:<param>=<value>` passes a plain (non-S3Object) run arg.\nimport { basename } from \"node:path\";\n\nexport type UploadBinding = { scriptTok: string; param?: string; source: string };\n\n/**\n * Parse a `--upload` spec: `<script>[:<param>]=<file-or-s3-uri>`.\n * Split on the FIRST `=` so an `s3://…` source (whose `:` sits to the right of\n * it) stays unambiguous; an optional `:<param>` on the left names the target\n * S3Object argument when the script declares more than one.\n */\nexport function parseUploadBinding(spec: string): UploadBinding {\n  const eq = spec.indexOf(\"=\");\n  const left = eq < 0 ? \"\" : spec.slice(0, eq).trim();\n  const source = eq < 0 ? \"\" : spec.slice(eq + 1).trim();\n  if (!left || !source) {\n    throw new Error(`--upload '${spec}' must be <script>[:<param>]=<file-or-s3-uri>`);\n  }\n  const colon = left.indexOf(\":\");\n  if (colon < 0) return { scriptTok: left, source };\n  const scriptTok = left.slice(0, colon).trim();\n  const param = left.slice(colon + 1).trim();\n  if (!scriptTok || !param) {\n    throw new Error(`--upload '${spec}' must be <script>[:<param>]=<file-or-s3-uri>`);\n  }\n  return { scriptTok, param, source };\n}\n\nexport type ArgBinding = { scriptTok: string; param: string; value: unknown };\n\n/**\n * Parse an `--arg` spec: `<script>:<param>=<value>`. Split on the FIRST `=`\n * (values may contain `=`); the value is JSON when it parses as JSON, else the\n * raw string — so `stats:limit=10` is a number and\n * `daily_report:partition=2026-07-02` a string. `:<param>` is required: unlike","sourceCodeStart":3,"sourceCodeEnd":39,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/src/commands/pipeline/pipelineUpload.ts#L3-L39","documentation":"Syntax validation in parseUploadBinding: the --upload spec doesn't match <script>[:<param>]=<file-or-s3-uri>. The parser splits on the first '=' and expects a non-empty script token on the left and a source on the right; the throw fires when either side is missing — e.g. no '=' at all, empty script name, or empty source. The input at fault is the --upload string as typed.","triggerScenarios":"Thrown at cli/src/commands/pipeline/pipelineUpload.ts:21 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use the documented shape: --upload myscript=./data.csv or --upload myscript:input_file=s3://bucket/key","Check for shell-quoting issues that stripped the '=' or the value","Ensure neither side of the first '=' is empty"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}