         .map { $0.replacingOccurrences(of: outputURL.path, with: rswiftGeneratedFile) }
         .map { $0.replacingOccurrences(of: sourceRootPath, with: "$SRCROOT") }
         .map { $0.contains(" ") ? "\"\($0)\"" : $0 }
+
       error += "\nExample: " + commandParts.joined(separator: " ")
+
+      outputFileForError = rswiftGeneratedFile
     }
 
     errors.append(error)

  }

  if !scriptOutputFiles.contains(outputURL.path) {
    var prettyPath = outputURL.path.replacingOccurrences(of: sourceRootPath, with: "$SRCROOT")
    if outputIsDirectory {
      prettyPath += "/R.generated.swift"
    }
    errors.append("Build phase Output Files do not contain '\(prettyPath)'.")
  }

  return errors

  commandLineArguments: [String]) -> [String]
{
  var errors: [String] = []
  var outputFileForError = outputURL.path

  if outputURL.pathExtension != "swift" {

    var error = "Output path must specify a file, it should not be a directory."
    if FileManager.default.directoryExists(atPath: outputURL.path) {
