{"record":{"id":"1dc06896dd52db9a","repo":"clockworklabs/SpacetimeDB","slug":"unknown-command-name-for-spacetimedb-update-multic","errorCode":null,"errorMessage":"unknown command name for spacetimedb-update multicall binary: {}","messagePattern":"unknown command name for spacetimedb-update multicall binary: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/update/src/main.rs","lineNumber":33,"sourceCode":"    let cmd = if let Some(cmd) = &env_cmd {\n        cmd\n    } else {\n        argv0.file_stem().context(\"argv0 must have a filename\")?\n    };\n    if cmd == \"spacetimedb-update\" {\n        spacetimedb_update_main()\n    } else if cmd == \"spacetime\" {\n        let args = args.collect::<Vec<_>>();\n        if args.first().is_some_and(|s| s == \"version\") {\n            // if the first arg is unambiguously `version`, go straight to `spacetime version`\n            spacetimedb_update_main()\n        } else {\n            proxy::run_cli(None, Some(argv0.as_os_str()), args)\n        }\n    } else if cmd == \"spacetime-install\" {\n        cli::SelfInstall::parse().exec()\n    } else {\n        anyhow::bail!(\n            \"unknown command name for spacetimedb-update multicall binary: {}\",\n            Path::new(cmd).display()\n        )\n    }\n}\n\nfn spacetimedb_update_main() -> anyhow::Result<ExitCode> {\n    let args = cli::Args::parse();\n    args.exec()\n}\n","sourceCodeStart":15,"sourceCodeEnd":44,"githubUrl":"https://github.com/clockworklabs/SpacetimeDB/blob/6dee26c6efc2856793e12b148a59742964f5d783/crates/update/src/main.rs#L15-L44","documentation":"crates/update/src/main.rs:33 implements a busybox-style multicall binary: it dispatches on argv[0] (cmd) and only recognizes `spacetimedb-update` (updater), `spacetime` (CLI proxy, with the special case that a first arg of `version` routes to the updater), and `spacetime-install` (SelfInstall). Any other executable name reaches the bail with the offending name printed.","triggerScenarios":"Copying or hardlinking the binary to a different filename (e.g. `sdb`) and invoking it; a packaging/entrypoint (Docker ENTRYPOINT, wrapper script, symlink farm) that sets argv[0] to something other than the three supported names; invoking the multicall binary through `busybox <applet>`-style call conventions it does not implement.","commonSituations":"Linux distributions or devcontainers renaming the binary for conflict avoidance; users creating short aliases via copies instead of shell aliases; CI images with an ENTRYPOINT naming the binary differently.","solutions":["Invoke the binary only through a supported name: create a symlink named `spacetime` (or `spacetimedb-update` / `spacetime-install`) pointing at it.","Fix the wrapper/entrypoint so argv[0] is one of the recognized names before exec.","For a short alias, use a shell alias/function (`alias sdb=spacetime`) rather than renaming the executable."],"exampleFix":"# before: binary copied under an unknown name\nmv spacetime-update sdb && ./sdb update\n# -> unknown command name for spacetimedb-update multicall binary: sdb\n# after: expose it under a supported name\nln -s spacetime-update spacetime && spacetime update","handlingStrategy":"validation","validationCode":"// Rust launcher: gate on argv[0] before running the multicall binary.\nconst KNOWN: &[&str] = &[\"spacetimedb-update\", \"spacetime\", \"spacetime-install\"];\nlet argv0 = std::env::args_os().next().unwrap();\nlet name = std::path::Path::new(&argv0).file_name().unwrap().to_string_lossy().into_owned();\nassert!(KNOWN.contains(&name.as_str()), \"invoke this binary as one of {KNOWN:?}\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Expose the binary only through symlinks named spacetime, spacetimedb-update, or spacetime-install.","Use shell aliases for short names instead of copying/renaming the executable.","In Dockerfiles/entrypoints, set the binary name (COPY --chmod with the right target name) so argv[0] matches a supported applet."],"tags":["spacetimedb","cli","multicall","argv0","installation"],"backgroundTag":"argv0-dispatch-failed","analyzedSha":"6dee26c6efc2856793e12b148a59742964f5d783","analyzedAt":"2026-08-20T06:08:37.179Z","contentChangedAt":"2026-08-20T06:08:37.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}