                     project.scripts.append(script)
                     target.body.buildPhases.append(buildPhase)
                     print("✅ Script \(scriptName) was successfully added to \(target.name) target.")
-                    projectHasBeenUpdated = true
+                    needUpdateProject = true
                 }
             }
 
-        if projectHasBeenUpdated {
+        if needUpdateProject {
             try projectService.update(project)
         }
-        else {
+        else if !filelistsWereUpdated {
             print("🤷‍♂️ Nothing to update.")
         }
     }

                let parent = carthageFolder.parent ?? projectFolder
                let path = listFolder.path.replacingOccurrences(of: parent.path, with: "$(SRCROOT)/").deleting(suffix: "/")

                let inputFileList = try listFolder.createFileIfNeeded(withName: "\(target.name)-inputPaths.xcfilelist")
                try inputFileList.write(string: inputPaths.joined(separator: "\n"))
                let inputFileListPath = [path, inputFileList.name].joined(separator: "/")

                let outputFileList = try listFolder.createFileIfNeeded(withName: "\(target.name)-outputPaths.xcfilelist")
                try outputFileList.write(string: outputPaths.joined(separator: "\n"))
                let outputFileListPath = [path, outputFileList.name].joined(separator: "/")

                let carthageBuildPhase = target.body.buildPhases.first { $0.name == scriptName }
                let carthageScript = project.scripts.first { $0.identifier == carthageBuildPhase?.identifier }

        if let targetName = targetName, filteredTargets.isEmpty {
            throw Error.targetFilterFailed(name: targetName)
        }

        let carthageDynamicFrameworks = try frameworksInformation()
            .filter { information in
                information.linking == .dynamic
            }

        try filteredTargets
            .forEach { target in
