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

Method getMachineName

ApprovalTests/utilities/SystemUtils.cpp:100–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98 }
99
100 std::string SystemUtils::getMachineName()
101 {
102 auto name = safeGetEnv("COMPUTERNAME");
103 if (!name.empty())
104 {
105 return name;
106 }
107
108 name = safeGetEnv("HOSTNAME");
109 if (!name.empty())
110 {
111 return name;
112 }
113
114 return "Unknown Computer";
115 }
116
117 void SystemUtils::makeDirectoryForWindows(const std::string& directory)
118 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected