Install extension from a specific repo/branch on GitHub?

I'm using a VS Code extension that has a bug. It has been fixed in a pull request on GitHub, but the repository seems to be abandoned and the PR is not getting merged.

How do I install an extension directly from a specific repo/branch on GitHub?

Upvotes: 49

Views: 19341

Answers (1)

AndyO
AndyO

Reputation: 1712

  • Install vsce:

    Make sure you have Node.js installed. Then run:

    npm install -g vsce
    
  • Check out the GitHub repo/branch you want.

  • Depending on the project, you may need to install its dependencies (npm install or whatever package manager you use). Some can be packaged without dependencies.

  • Run the following in the root of the project (see the official docs for more detail about the process):

    vsce package  # Generates a .vsix file
    code --install-extension my-extension-0.0.1.vsix
    

Upvotes: 62

Related Questions