don't delete old location of taskHistory in migration for now (#5931)
This commit is contained in:
1 parent
987812a886
commit
ca3f0f1abd
1 file changed
+3
-1
@@ -77,7 +77,9 @@ export async function migrateTaskHistoryToFile(context: vscode.ExtensionContext)
|
||||
console.log("[Storage Migration] taskHistory from vscode global state: ", vscodeGlobalStateTaskHistory)
|
||||
// Always create the file, even when empty
|
||||
await writeTaskHistoryToState(context, Array.isArray(vscodeGlobalStateTaskHistory) ? vscodeGlobalStateTaskHistory : [])
|
||||
await context.globalState.update("taskHistory", undefined)
|
||||
// Don't remove the old taskHistory yet, while this version is not in production, for better dev experience.
|
||||
// This is because the old version of the code (still in prod) is still reading taskHistory from the vs code global state, so it will appear as if all the user's tasks have been deleted.
|
||||
// await context.globalState.update("taskHistory", undefined)
|
||||
console.log("[Storage Migration] taskHistory file in new location: ", await readTaskHistoryFromState(context))
|
||||
console.log("[Storage Migration] old vscode global state: ", await context.globalState.get("taskHistory"))
|
||||
} catch (error) {
|
||||
|
||||
Reference in new issue
Block a user