MCPcopy
hub / github.com/Kong/insomnia / getPreferredCacheDirectories

Function getPreferredCacheDirectories

packages/insomnia/bin/yarn-standalone.js:1939–1950  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1937const REQUIRED_PACKAGE_KEYS = exports.REQUIRED_PACKAGE_KEYS = ['name', 'version', '_uid'];
1938
1939function getPreferredCacheDirectories() {
1940 const preferredCacheDirectories = [getCacheDir()];
1941
1942 if (process.getuid) {
1943 // $FlowFixMe: process.getuid exists, dammit
1944 preferredCacheDirectories.push(path.join(os.tmpdir(), `.yarn-cache-${process.getuid()}`));
1945 }
1946
1947 preferredCacheDirectories.push(path.join(os.tmpdir(), `.yarn-cache`));
1948
1949 return preferredCacheDirectories;
1950}
1951
1952const PREFERRED_MODULE_CACHE_DIRECTORIES = exports.PREFERRED_MODULE_CACHE_DIRECTORIES = getPreferredCacheDirectories();
1953const CONFIG_DIRECTORY = exports.CONFIG_DIRECTORY = getConfigDir();

Callers 1

yarn-standalone.jsFile · 0.85

Calls 2

getCacheDirFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected