Skip to content

Commit cbae3a0

Browse files
committed
Change plain path to sha256 hash
1 parent 59d93ae commit cbae3a0

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

lib/gather/cache.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
const Cache = require('sync-disk-cache');
22
const getRepoInfo = require('git-repo-info');
3+
const crypto = require('crypto');
34

45
const gitInfo = getRepoInfo();
56

6-
const cwd = process.cwd().replace(':', '꞉');
7+
const cwdHash = crypto
8+
.createHash('sha256')
9+
.update(process.cwd(), 'utf8')
10+
.digest('hex');
711

8-
const cachePath = `ember-codemods-telemetry-helpers-${gitInfo.sha}-${cwd}`;
12+
const cachePath = `ember-codemods-telemetry-helpers-${gitInfo.sha}-${cwdHash}`;
913

1014
const cache = new Cache(cachePath);
1115

0 commit comments

Comments
 (0)