We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 55ce8ee commit 7f0a5cfCopy full SHA for 7f0a5cf
src/config/ConfigLoader.js
@@ -57,9 +57,21 @@ class ConfigLoader extends EventEmitter {
57
}
58
59
async initialize() {
60
- // Initialize cache directory using env-paths
61
- const paths = envPaths('git-proxy', { suffix: '' });
+ // Get cache directory path
+ const paths = envPaths('git-proxy');
62
this.cacheDir = paths.cache;
63
+
64
+ // Create cache directory if it doesn't exist
65
+ if (!fs.existsSync(this.cacheDir)) {
66
+ try {
67
+ fs.mkdirSync(this.cacheDir, { recursive: true });
68
+ return true;
69
+ } catch (err) {
70
+ console.error('Failed to create cache directory:', err);
71
+ return false;
72
+ }
73
74
75
76
77
async start() {
0 commit comments