Skip to content

Commit f95e43a

Browse files
author
Robert Jackson
authored
Fix colon character in cwd on Windows (#27)
Fix colon character in cwd on Windows
2 parents e97d335 + cbae3a0 commit f95e43a

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

lib/gather/cache.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
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 cachePath = `ember-codemods-telemetry-helpers-${gitInfo.sha}-${process.cwd()}`;
7+
const cwdHash = crypto
8+
.createHash('sha256')
9+
.update(process.cwd(), 'utf8')
10+
.digest('hex');
11+
12+
const cachePath = `ember-codemods-telemetry-helpers-${gitInfo.sha}-${cwdHash}`;
13+
714
const cache = new Cache(cachePath);
815

916
module.exports = cache;

0 commit comments

Comments
 (0)