Skip to content

Commit 28d9027

Browse files
authored
feat: report more msvc CL errors (#76)
1 parent 431c80b commit 28d9027

File tree

1 file changed

+10
-9
lines changed
  • ecsact/cli/commands/build/recipe

1 file changed

+10
-9
lines changed

ecsact/cli/commands/build/recipe/cook.cc

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -521,18 +521,19 @@ auto cl_compile(compile_options options) -> int {
521521

522522
struct : ecsact::cli::detail::spawn_reporter {
523523
auto on_std_out(std::string_view line) -> std::optional<message_variant_t> {
524-
auto index = line.find("): ");
525-
if(index == std::string::npos) {
526-
return {};
527-
}
528-
529-
auto msg_content = line.substr(index + 3);
530-
531-
if(msg_content.starts_with("warning")) {
524+
if(line.find(": warning") != std::string::npos) {
532525
return ecsact::cli::warning_message{
533526
.content = std::string{line},
534527
};
535-
} else if(msg_content.starts_with("error")) {
528+
} else if(line.find(": error") != std::string::npos) {
529+
return ecsact::cli::error_message{
530+
.content = std::string{line},
531+
};
532+
} else if(line.find(": fatal error ") != std::string::npos) {
533+
return ecsact::cli::error_message{
534+
.content = std::string{line},
535+
};
536+
} else if(line.find(": Command line error ") != std::string::npos) {
536537
return ecsact::cli::error_message{
537538
.content = std::string{line},
538539
};

0 commit comments

Comments
 (0)