mirror of
https://github.com/hexboy/maven-mirror-tool.git
synced 2025-09-02 02:29:17 +00:00
change local cache prefix
This commit is contained in:
parent
ff3df49344
commit
1a70e2a0a1
2 changed files with 3 additions and 2 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -130,7 +130,8 @@ dist
|
||||||
.pnp.*
|
.pnp.*
|
||||||
|
|
||||||
# local cache prefix
|
# local cache prefix
|
||||||
__MMSLM_CACHE__/
|
__MMT_CACHE__/
|
||||||
|
|
||||||
# local config file
|
# local config file
|
||||||
config.local.yml
|
config.local.yml
|
||||||
|
.DS_Store
|
||||||
|
|
2
index.ts
2
index.ts
|
@ -21,7 +21,7 @@ const cacheDir = args['cache-dir'] || config.CACHE_DIR;
|
||||||
const defaultPath = args.path || config.DEFAULT_PATH || 'v1';
|
const defaultPath = args.path || config.DEFAULT_PATH || 'v1';
|
||||||
const verbose = args.verbose || config.LOG_REQUESTS || false;
|
const verbose = args.verbose || config.LOG_REQUESTS || false;
|
||||||
|
|
||||||
const cacheBaseDir = path.resolve(cacheDir, '__MMSLM_CACHE__');
|
const cacheBaseDir = path.resolve(cacheDir, '__MMT_CACHE__');
|
||||||
|
|
||||||
if (!fs.existsSync(path.resolve(cacheBaseDir, '_tmp_'))) {
|
if (!fs.existsSync(path.resolve(cacheBaseDir, '_tmp_'))) {
|
||||||
fs.mkdirSync(path.resolve(cacheBaseDir, '_tmp_'), { recursive: true });
|
fs.mkdirSync(path.resolve(cacheBaseDir, '_tmp_'), { recursive: true });
|
||||||
|
|
Loading…
Add table
Reference in a new issue