aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/commands_integrate.cpp
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-03-22 17:45:39 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2017-03-22 17:45:39 -0700
commit4bc91f1f269aa72dccd51a8f07134e4e66701793 (patch)
treedab6f286b6f07b47d73a8bb05b16db66fe1dadd1 /toolsrc/src/commands_integrate.cpp
parent27bc6060203b5232bfb3b022b08ef66f64fb3ba9 (diff)
downloadvcpkg-4bc91f1f269aa72dccd51a8f07134e4e66701793.tar.gz
vcpkg-4bc91f1f269aa72dccd51a8f07134e4e66701793.zip
[commands] Use Checks::exit_fail/success/with_code()
Diffstat (limited to 'toolsrc/src/commands_integrate.cpp')
-rw-r--r--toolsrc/src/commands_integrate.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/toolsrc/src/commands_integrate.cpp b/toolsrc/src/commands_integrate.cpp
index 8e23a3dcf..b72a7a483 100644
--- a/toolsrc/src/commands_integrate.cpp
+++ b/toolsrc/src/commands_integrate.cpp
@@ -154,7 +154,7 @@ namespace vcpkg::Commands::Integrate
break;
case elevation_prompt_user_choice::no:
System::println(System::color::warning, "Warning: Previous integration file was not removed");
- exit(EXIT_FAILURE);
+ Checks::exit_fail(VCPKG_LINE_INFO);
default:
Checks::unreachable(VCPKG_LINE_INFO);
}
@@ -193,7 +193,7 @@ namespace vcpkg::Commands::Integrate
break;
case elevation_prompt_user_choice::no:
System::println(System::color::warning, "Warning: integration was not applied");
- exit(EXIT_FAILURE);
+ Checks::exit_fail(VCPKG_LINE_INFO);
default:
Checks::unreachable(VCPKG_LINE_INFO);
}
@@ -208,7 +208,7 @@ namespace vcpkg::Commands::Integrate
if (!fs::copy_file(appdata_src_path, appdata_dst_path, fs::copy_options::overwrite_existing))
{
System::println(System::color::error, "Error: Failed to copy file: %s -> %s", appdata_src_path.string(), appdata_dst_path.string());
- exit(EXIT_FAILURE);
+ Checks::exit_fail(VCPKG_LINE_INFO);
}
System::println(System::color::success, "Applied user-wide integration for this vcpkg root.");
const fs::path cmake_toolchain = paths.buildsystems / "vcpkg.cmake";
@@ -219,7 +219,7 @@ namespace vcpkg::Commands::Integrate
"\n"
"CMake projects should use -DCMAKE_TOOLCHAIN_FILE=%s", cmake_toolchain.generic_string());
- exit(EXIT_SUCCESS);
+ Checks::exit_success(VCPKG_LINE_INFO);
}
static void integrate_remove()
@@ -240,7 +240,7 @@ namespace vcpkg::Commands::Integrate
System::println(System::color::success, "User-wide integration is not installed");
}
- exit(EXIT_SUCCESS);
+ Checks::exit_success(VCPKG_LINE_INFO);
}
static void integrate_project(const vcpkg_paths& paths)
@@ -276,7 +276,7 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console
Install-Package %s -Source "%s"
)", nuget_id, buildsystems_dir.generic_string());
- exit(EXIT_SUCCESS);
+ Checks::exit_success(VCPKG_LINE_INFO);
}
const char* const INTEGRATE_COMMAND_HELPSTRING =