MCPcopy Create free account
hub / github.com/Alexays/Waybar / findIncludePath

Method findIncludePath

src/config.cpp:109–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109std::vector<std::string> Config::findIncludePath(const std::string& name,
110 const std::vector<std::string>& dirs) {
111 auto match1 = tryExpandPath(name, "");
112 if (!match1.empty()) {
113 return match1;
114 }
115 if (const char* dir = std::getenv(Config::CONFIG_PATH_ENV)) {
116 if (auto res = tryExpandPath(dir, name); !res.empty()) {
117 return res;
118 }
119 }
120 for (const auto& dir : dirs) {
121 if (auto res = tryExpandPath(dir, name); !res.empty()) {
122 return res;
123 }
124 }
125
126 return {};
127}
128
129void Config::resolveConfigIncludes(Json::Value& config, int depth) {
130 Json::Value includes = config["include"];

Callers

nothing calls this directly

Calls 1

emptyMethod · 0.80

Tested by

no test coverage detected