Skip to content

Commit

Permalink
Show error message in Xcode
Browse files Browse the repository at this point in the history
  • Loading branch information
tomlokhorst committed Sep 4, 2017
1 parent a5c3d86 commit e6fa3cd
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Sources/rswift/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -156,16 +156,12 @@ if !exception && parser.shift() != "generate" {
.map { $0.contains(" ") ? "\"\($0)\"" : $0 }
.joined(separator: " ")

let message = "⚠️ R.swift 4 requires \"generate\" command as first argument to the executable.\n"
let message = "error: R.swift 4 requires \"generate\" command as first argument to the executable.\n"
+ "Change your call to something similar to this:\n\n"
+ "\(command)"
+ "\n"

if isatty(fileno(stderr)) != 0 {
fputs("\(message)\n", stderr)
} else {
fputs("\(message)\n", stderr)
}
fputs("\(message)\n", stderr)
exit(EXIT_FAILURE)
}

Expand Down

0 comments on commit e6fa3cd

Please sign in to comment.