MCPcopy
hub / github.com/faressoft/terminalizer / getDefaultConfig

Function getDefaultConfig

utility.js:194–209  ·  view source on GitHub ↗

* Get the default configurations * * - Check if there is a global config file * - Found: Get the global config file * - Not Found: Get the default config file * * @return {Object} {json, raw}

()

Source from the content-addressed store, hash-verified

192 * @return {Object} {json, raw}
193 */
194function getDefaultConfig() {
195
196 var defaultConfigPath = di.path.join(ROOT_PATH, 'config.yml');
197 var globalConfigPath = di.path.join(getGlobalDirectory(), 'config.yml');
198
199 // The global config file exists
200 if (isFile(globalConfigPath)) {
201 return loadYAML(globalConfigPath);
202 }
203
204 console.log('defaultConfigPath');
205
206 // Load global config file
207 return loadYAML(defaultConfigPath);
208
209}
210
211/**
212 * Change a value for a specific key in YAML

Callers

nothing calls this directly

Calls 3

getGlobalDirectoryFunction · 0.85
isFileFunction · 0.85
loadYAMLFunction · 0.85

Tested by

no test coverage detected