Skip to content

[BUG] Shell detection crashes when terminal default profile setting is not a string #686

Closed

Description

@daewoongoh

Describe the bug
Zoo can crash with Provider ended the request: t.toLowerCase is not a function when the VS Code terminal default profile setting is misconfigured with a non-string value.

To Reproduce
Steps to reproduce the behavior:

  1. Open VS Code settings JSON.
  2. Set the terminal default profile to a non-string value. For example, on Windows:
    {
      "terminal.integrated.defaultProfile.windows": 1
    }
    Other invalid values such as true, [], or {} can also reproduce the issue.
  3. Run Zoo and trigger a request that causes Zoo to resolve the shell configuration.
  4. See error:
    Provider ended the request: t.toLowerCase is not a function
    

Expected behavior
Zoo should not crash when VS Code terminal profile settings contain an invalid type.

Screenshots
N/A

Video
N/A

What version of zoo are you running
3.62.0

Additional context
This seems to be a runtime type validation issue rather than a TypeScript typing issue. config.get<string>() only affects the static type, but it does not guarantee that the actual value from user settings is a string.

The current code assumes defaultProfileName is a string before calling .toLowerCase(), which can fail when the VS Code settings JSON is manually edited or corrupted.

Activity

  1. added theissue type on Jun 22, 2026
  2. changed the title [-][BUG][/-] [+][BUG] Shell detection crashes when terminal default profile setting is not a string[/+] on Jun 22, 2026
  3. daewoongoh commented on Jun 22, 2026

    @daewoongoh
    ContributorAuthor

    Claiming

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions