MCPcopy Create free account
hub / github.com/covscript/covscript / get_import_path

Function get_import_path

sources/covscript.cpp:294–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

292#endif
293
294 std::string get_import_path()
295 {
296 const char *import_path = std::getenv("CS_IMPORT_PATH");
297 std::string base_path = get_sdk_path() + cs::path_separator + "imports";
298#ifdef COVSCRIPT_PLATFORM_HOME
299 base_path += cs::path_delimiter + std::string(COVSCRIPT_PLATFORM_HOME) + cs::path_separator + "imports";
300#endif
301 if (import_path != nullptr)
302 return process_path(std::string(import_path) + cs::path_delimiter + base_path);
303 else
304 return process_path(base_path);
305 }
306
307 void prepend_import_path(const std::string &script, cs::process_context *context)
308 {

Callers 2

covscript_mainFunction · 0.70
covscript_mainFunction · 0.70

Calls 3

getenvFunction · 0.85
get_sdk_pathFunction · 0.85
process_pathFunction · 0.85

Tested by

no test coverage detected