From 4bf557754b9b518a51691a65342a85f5691f12c2 Mon Sep 17 00:00:00 2001 From: Leander Schulten Date: Sat, 5 Jun 2021 00:35:31 +0200 Subject: [PATCH] vcpkg integrate bash: use ~/.bash_profile on macOS --- src/vcpkg/commands.integrate.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vcpkg/commands.integrate.cpp b/src/vcpkg/commands.integrate.cpp index e1bb8cd930..0d648b03a3 100644 --- a/src/vcpkg/commands.integrate.cpp +++ b/src/vcpkg/commands.integrate.cpp @@ -444,7 +444,11 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console static void integrate_bash(const VcpkgPaths& paths) { const auto home_path = System::get_environment_variable("HOME").value_or_exit(VCPKG_LINE_INFO); +#if defined(__APPLE__) + const fs::path bashrc_path = fs::path{home_path} / ".bash_profile"; +#else const fs::path bashrc_path = fs::path{home_path} / ".bashrc"; +#endif auto& fs = paths.get_filesystem(); const fs::path completion_script_path = paths.scripts / "vcpkg_completion.bash";