diff --git a/src/Command/CommandRun.cpp b/src/Command/CommandRun.cpp index 6cfc152..d3449a6 100644 --- a/src/Command/CommandRun.cpp +++ b/src/Command/CommandRun.cpp @@ -16,9 +16,21 @@ namespace Command { return false; } #else - system("mkdir -p build"); + int success = system("mkdir -p build"); + if (success != 0) { + std::cout << "Error creating build directory" << std::endl; + return false; + } system("cmake . "); + if (success != 0) { + std::cout << "Error building project cmake" << std::endl; + return false; + } system("make"); + if (success != 0) { + std::cout << "Error building project make" << std::endl; + return false; + } #endif std::string file_name = "./build/"; #ifdef DEBUG @@ -26,6 +38,11 @@ namespace Command { #endif std::string command = file_name + ctx->project_name; success = system(command.c_str()); + if (success != 0) { + std::cout << "Error running project" << std::endl; + return false; + } + if (success != 0) { std::cout << "Error running project" << std::endl; return false;