Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Portable version of VSCode uses absolute path for location entry in data\extensions\extensions.json #210411

Open
daixtrose opened this issue Apr 15, 2024 · 0 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug extensions Issues concerning extensions
Milestone

Comments

@daixtrose
Copy link

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.88.1
  • OS Version: Windows 11

Steps to Reproduce:

  1. Unzip the portable version of VSCode to an arbitrary empty directory (e.g. C:\Users\<username>\Downloads\VSCode-win32-x64-1.88.1)
  2. Create a new directory data in this directory, i.e. C:\Users\<username>\Downloads\VSCode-win32-x64-1.88.1\data
  3. Install some extensions
  4. Check the content of the file data\extensions\extensions.json, i.e. C:\Users\<username>\Downloads\VSCode-win32-x64-1.88.1\data\extensions\extensions.json

Expected Behavior

A relocatable configuration file

Actual Behavior

The configuration file contains full paths to the installed extensions. This renders the data directory feature useless for pre-installing stuff, then distributing it to other users, and this is a true PITA.

[
    {
        "identifier": {
            "id": "ms-vscode.remote-explorer",
            "uuid": "11858313-52cc-4e57-b3e4-d7b65281e34b"
        },
        "version": "0.4.3",
        "location": {
            "$mid": 1,
            "path": "/C:/Users/<username>/Downloads/VSCode-win32-x64-1.88.1/data/extensions/ms-vscode.remote-explorer-0.4.3",
            "scheme": "file"
        },
        "relativeLocation": "ms-vscode.remote-explorer-0.4.3",
        "metadata": {
            "id": "11858313-52cc-4e57-b3e4-d7b65281e34b",
            "publisherId": "5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee",
            "publisherDisplayName": "Microsoft",
            "targetPlatform": "undefined",
            "updated": false,
            "isPreReleaseVersion": false,
            "hasPreReleaseVersion": false,
            "installedTimestamp": 1713161142173,
            "pinned": false,
            "source": "gallery"
        }
    },
    {
        "identifier": {
            "id": "ms-vscode-remote.vscode-remote-extensionpack",
            "uuid": "23d72dfc-8dd1-4e30-926e-8783b4378f13"
        },
        "version": "0.25.0",
        "location": {
            "$mid": 1,
            "path": "/C:/Users/<username>/Downloads/VSCode-win32-x64-1.88.1/data/extensions/ms-vscode-remote.vscode-remote-extensionpack-0.25.0",
            "scheme": "file"
        },
        "relativeLocation": "ms-vscode-remote.vscode-remote-extensionpack-0.25.0",
        "metadata": {
            "id": "23d72dfc-8dd1-4e30-926e-8783b4378f13",
            "publisherId": "ac9410a2-0d75-40ec-90de-b59bb705801d",
            "publisherDisplayName": "Microsoft",
            "targetPlatform": "undefined",
            "updated": false,
            "isPreReleaseVersion": false,
            "hasPreReleaseVersion": false,
            "installedTimestamp": 1713161142134,
            "pinned": false,
            "source": "gallery"
        }
    },
    ...

Requested Behavior

Remove directory path of extensions.json (i.e. /C:/Users/<username>/Downloads/VSCode-win32-x64-1.88.1/data/extensions/) from all location.path entries and remove the entry relativeLocation

[
    {
        "identifier": {
            "id": "ms-vscode.remote-explorer",
            "uuid": "11858313-52cc-4e57-b3e4-d7b65281e34b"
        },
        "version": "0.4.3",
        "location": {
            "$mid": 1,
            "path": "ms-vscode.remote-explorer-0.4.3",
            "scheme": "file"
        },
        "metadata": {
            "id": "11858313-52cc-4e57-b3e4-d7b65281e34b",
            "publisherId": "5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee",
            "publisherDisplayName": "Microsoft",
            "targetPlatform": "undefined",
            "updated": false,
            "isPreReleaseVersion": false,
            "hasPreReleaseVersion": false,
            "installedTimestamp": 1713161142173,
            "pinned": false,
            "source": "gallery"
        }
    },
    {
        "identifier": {
            "id": "ms-vscode-remote.vscode-remote-extensionpack",
            "uuid": "23d72dfc-8dd1-4e30-926e-8783b4378f13"
        },
        "version": "0.25.0",
        "location": {
            "$mid": 1,
            "path": "ms-vscode-remote.vscode-remote-extensionpack-0.25.0",
            "scheme": "file"
        },
        "metadata": {
            "id": "23d72dfc-8dd1-4e30-926e-8783b4378f13",
            "publisherId": "ac9410a2-0d75-40ec-90de-b59bb705801d",
            "publisherDisplayName": "Microsoft",
            "targetPlatform": "undefined",
            "updated": false,
            "isPreReleaseVersion": false,
            "hasPreReleaseVersion": false,
            "installedTimestamp": 1713161142134,
            "pinned": false,
            "source": "gallery"
        }
    },
    ...
@sandy081 sandy081 added bug Issue identified by VS Code Team member as probable bug extensions Issues concerning extensions labels Apr 18, 2024
@sandy081 sandy081 modified the milestones: April 2024, May 2024 Apr 18, 2024
@sandy081 sandy081 modified the milestones: May 2024, June 2024 May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug extensions Issues concerning extensions
Projects
None yet
Development

No branches or pull requests

2 participants