Skip to content

Reading .env file on Windows (suggested solution) #31

@AndyBevan

Description

@AndyBevan

Really like this extension, thanks for taking the time to put it together. I spent some time poking around in it and debugging. I'm running on windows and noticed it was not managing to read my connection string from the environment file.

Bit of debugging later and I find that it's having problems within getDotEnvValue on this line const envFile = path.resolve(workspaceDir, ".env"); because workspaceDir doesn't work on windows how it's written right now.

I also note this comment --> "there's an issue here on Windows"

I think we could swap const workspaceDir = vscode.workspace.workspaceFolders[0].uri.path for const workspaceDir = vscode.workspace.workspaceFolders[0].uri.fsPath in editor.js -

Is it worth putting a PR for this out there? Or is this repo unlikely to get much attention?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions