Skip to content

[Bug]: Not apparently possible to install multiple extensions from config file #6149

Closed

Description

@tomqwpl

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser:
  • Local OS: Windows
  • Remote OS: Linux
  • Remote Architecture: amd64
  • code-server --version: 4.10.1

Steps to Reproduce

Attempting to run code-server with a config file such as:

install-extension:
  - extension.number1
  - extension.number2

This fails with (e.g):

Installing extensions...
Extension 'ms-python.python,ms-vscode.makefile-tools' not found.
Make sure you use the full extension ID, including the publisher, e.g.: ms-dotnettools.csharp
Failed Installing Extensions: ms-python.python,ms-vscode.makefile-tools

The problem seems to be in the conversion of the config file into command line arguments:

  const configFileArgv = Object.entries(config).map(([optName, opt]) => {
    if (opt === true) {
      return `--${optName}`
    }
    return `--${optName}=${opt}`
  })

My guess is that there "opt" is a []string, so it ends up constructing "--install-extension=extension.number1,extension.number2"

Expected

Both extensions should be installed in the same way as if multiple install-extension command line arguments were passed

Actual

code-server errors on startup.

Logs

No response

Screenshot/Video

No response

Does this issue happen in VS Code or GitHub Codespaces?

  • I cannot reproduce this in VS Code.
  • I cannot reproduce this in GitHub Codespaces.

Are you accessing code-server over HTTPS?

  • I am using HTTPS.

Notes

No response

Activity

  1. added
    bugSomething isn't working
    triageThis issue needs to be triaged by a maintainer
    on Apr 14, 2023
  2. code-asher commented on Apr 14, 2023

    @code-asher
    Member

    Oh right the parser expects the flag to repeat --install-extension <id> --install-extension <id> but duplicated keys are not possible in yaml. We should support splitting on commas for sure.

  3. code-asher commented on Apr 14, 2023

    @code-asher
    Member

    Although maybe just handling arrays in configFileArgv would be better. Comma split would be nice since then we could use it on the command line as well since the repeating flag syntax is a bit unwieldy.

  4. removed
    triageThis issue needs to be triaged by a maintainer
    on Jul 12, 2024
  5. added 2 commits that reference this issue on May 5, 2025
    a9c8392
    d754e0f
  6. added a commit that references this issue on May 6, 2025
    c8257a3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions