databricks/databricks-vscode

Can't load .env file

twsl opened this issue · 2 comments

twsl commented

When running the databricks extension on windows inside a unix devcontainer, the path doesnt get joined correctly because the separator is incorrect:

{ logger: 'Extension', operationId: '910b7a41-fc11-4ea2-ae62-f5fe8d30d609', operationName: 'DatabricksEnvFileManager.writeFile', loggingFunction: 'DatabricksEnvFileManager.writeFile', timestamp: 1686137586537, error: { stack: "Error: ENOENT: no such file or directory, open '/workspaces/databricks-template\\.databricks\\.databricks.env'", message: "ENOENT: no such file or directory, open '/workspaces/databricks-template\\.databricks\\.databricks.env'", errno: -2, code: 'ENOENT', syscall: 'open', path: '/workspaces/databricks-template\\.databricks\\.databricks.env' }, level: 'error', message: "Can't load .env file" }

twsl commented

thanks @nfx was about to close the issue myself, moving is better

Hi @twsl. This is a nasty bug. The extension resolves paths based on the host os (the os with which vscode was initially launched).
You can manually editpython.envFile setting in vscode settings for now.

I will keep this open and take a look at how we can possibly fix it. cc @fjakobs