Skip to content

Commit

Permalink
fix: new cache file path
Browse files Browse the repository at this point in the history
  • Loading branch information
shaodahong committed May 25, 2022
1 parent d8e488a commit 97467e0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
const os = require("os");
const alfy = require("alfy");
const alfredNotifier = require("alfred-notifier");
const fs = require("fs");

// Checks for available update and updates the `info.plist`
alfredNotifier();

const userHomeDir = os.homedir();
const codeCachePath = `${userHomeDir}/Library/Application Support/Code/storage.json`;
const codeCacheJson = require(codeCachePath);
const newCodeCachePath = `${userHomeDir}/Library/Application Support/Code/User/globalStorage/storage.json`;
let codeCacheJson;

try {
codeCacheJson = require(codeCachePath);
} catch (error) {
codeCacheJson = require(newCodeCachePath);
}
let emptyOutput = [];

try {
Expand Down

0 comments on commit 97467e0

Please sign in to comment.