I am not sure how to reproduce reliably, but I noticed that sometimes when I use code --install-extension from-vsix --no-sync and VS Code is looking up installed extensions then extensions can be installed but sync. I guess it is because getInstalled already scan extracted extension but miss update to metadata. I could not find any code which can prevent such behaviour.
I think this method should accept initial metadata:
|
async extractUserExtension(identifierWithVersion: ExtensionIdentifierWithVersion, zipPath: string, token: CancellationToken): Promise<ILocalExtension> { |
and write them before renaming, not afterwards to avoid race.
I am not sure how to reproduce reliably, but I noticed that sometimes when I use
code --install-extension from-vsix --no-syncand VS Code is looking up installed extensions then extensions can be installed but sync. I guess it is because getInstalled already scan extracted extension but miss update to metadata. I could not find any code which can prevent such behaviour.I think this method should accept initial metadata:
vscode/src/vs/platform/extensionManagement/node/extensionsScanner.ts
Line 103 in ee1655a