 
     public enum Error: Swift.Error {
         case unsupportedLayout(reason: String)
+        case packageAlreadyExists
     }
 
     public static func findDependenciesInsertLocation(in manifest: String) throws -> (line: Int, indentation: Int) {

    public var errorDescription: String? {
        switch self {
        case .unsupportedLayout(let reason): return "The layout of your Package.swift is unsupported. \(reason)"
        }
    }
}

    }

    public static func insert(package: Repository, requirement: Requirement, into manifest: String) throws -> String {
        guard !manifest.contains(package.nameWithOwner) else { throw Error.packageAlreadyExists }

        let swiftVersion = SwiftVersion.guessVersion(fromPackageContents: manifest)
        let (line, indentation) = try findDependenciesInsertLocation(in: manifest)

