MCPcopy Create free account
hub / github.com/approvals/ApprovalTests.cpp / getProgramFileLocations

Method getProgramFileLocations

ApprovalTests/reporters/DiffInfo.cpp:36–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34 }
35
36 std::vector<std::string> DiffInfo::getProgramFileLocations()
37 {
38 std::vector<std::string> possibleWindowsPaths;
39 const std::vector<const char*> envVars = {
40 "ProgramFiles", "ProgramW6432", "ProgramFiles(x86)"};
41
42 for (const auto& envVar : envVars)
43 {
44 std::string envVarValue = SystemUtils::safeGetEnv(envVar);
45 if (!envVarValue.empty())
46 {
47 envVarValue += '\\';
48 possibleWindowsPaths.push_back(envVarValue);
49 }
50 }
51 return possibleWindowsPaths;
52 }
53
54 std::string DiffInfo::getProgramForOs() const
55 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected