Skip to content

Commit ef99fb9

Browse files
committed
Ask before executing the servicing script
1 parent 0ae96dd commit ef99fb9

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

premake5.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ workspace "MTADiag"
2121

2222
project "MTADiag"
2323
language "C++"
24-
cppdialect "C++14"
24+
cppdialect "C++17"
2525
kind "ConsoleApp"
26+
buildoptions { "/std:c++latest" }
2627

2728
defines { "BUILDING_LIBCURL" }
2829
includedirs { "include", "vendor/curl/include" }

src/main.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,15 @@ int main()
2626
// Run servicing auto-fix script
2727
try
2828
{
29-
ServicingScript ss;
30-
ss.Run();
29+
std::cout << "Do you want MTADiag to auto-fix your installation? By entering 'y' you allow us to make system changes." << std::endl;
30+
std::string answer;
31+
if (auto c = std::getchar(); c == 'y' || c == 'Y')
32+
{
33+
std::cout << "Alright! Starting now..." << std::endl;
34+
35+
ServicingScript ss;
36+
ss.Run();
37+
}
3138
}
3239
catch (std::runtime_error& ex)
3340
{

0 commit comments

Comments
 (0)