Skip to content

Go Companion ignores go.testEnvFile settings #5

Description

@firelizzard18

Original issue report by @m1yon (with unnecessary details elided):

Describe the bug

When using the Go Companion extension, env variables aren't being loaded from the env file specified with the go.testEnvFile setting. If I disable the extension, things work as usual.

Steps to reproduce the behavior:

  1. Add "go.testEnvFile": "${workspaceFolder}/.env" to your vscode settings
  2. Create a .env file in the root of your workspace with a dummy env variable
  3. Create a test that references the dummy env variable you created
  4. Run the "Test: Run All Tests" command
  5. See that the dummy env variable does not exist

My response:

I'm marking this as help wanted because I'm not sure when I'll get to it (the day job takes priority). It should be sufficient to add an entry to TestConfig and update TestRunner.#runPkg to check the config, read the file, and pass the vars to this.#spawn(...).

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions