*
()
| 87 | * |
| 88 | */ |
| 89 | function checkCache () { |
| 90 | loadMainConfigFile (); |
| 91 | const cachePath = getCacheDirectory (); |
| 92 | const marketsPath = path.join (cachePath, 'markets'); |
| 93 | if (!fs.existsSync (cachePath)) { |
| 94 | try { |
| 95 | fs.mkdirSync (cachePath, { |
| 96 | 'recursive': true, |
| 97 | }); |
| 98 | } catch (e) { |
| 99 | log.red ('Error creating cache directory', cachePath); |
| 100 | } |
| 101 | } else if (!fs.existsSync (marketsPath)) { |
| 102 | try { |
| 103 | fs.mkdirSync (marketsPath, { |
| 104 | 'recursive': true, |
| 105 | }); |
| 106 | } catch (e) { |
| 107 | log.red ('Error creating cache directory', cachePath); |
| 108 | } |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | /** |
| 113 | * |
no test coverage detected
searching dependent graphs…