         isLibrary: Bool,
         wholeModuleOptimization: Bool
     ) {
+        assert(commands[name] == nil, "aleady had a command named '\(name)'")
         let tool = SwiftCompilerTool(
             inputs: inputs,
             outputs: outputs,

        workingDirectory: String? = nil,
        allowMissingInputs: Bool = false
    ) {
        let tool = ShellTool(
            description: description,
            inputs: inputs,

            isLibrary: isLibrary,
            wholeModuleOptimization: wholeModuleOptimization
        )
        commands[name] = Command(name: name, tool: tool)
    }
}
