metalbear-co / mirrord-vscode

Connect your local process and your cloud environment, and run local code in cloud conditions.
https://mirrord.dev
MIT License
8 stars 10 forks source link

Pass environment variables to mirrord invocations #70

Closed aviramha closed 1 year ago

aviramha commented 1 year ago

When setting configuration via env, when it verifies the IDE doesn't pass the env that would be passed to the process so it creates difference between rendering on verification and execution.

meowjesty commented 1 year ago

Why do we clear the env vars we get from vscode (extension entry-point)?

https://github.com/metalbear-co/mirrord-vscode/blob/463b2e335f28a4a4ad524b1e178a83a1c47e8d0d/src/debugger.ts#L127-L130

From what I'm getting, you can't set mirrord with env vars in the extension, it has to be set up with a config file.

So the goal here is to make this possible? Set up mirrord completely from env vars in launch.json, and pass this env var config through the usual flow? First checking if it's valid (verify-config), then allowing user to select target, and so on?

aviramha commented 1 year ago

It's not clearing, it's initializing if it's not initialized if config.env is null -> config.env = {} else do nothing

aviramha commented 1 year ago

The goal is to pass "config.env" in the verify-config exec and in the mirrord ext exec to the configuration won't drift between executions.

meowjesty commented 1 year ago

The env vars from launch.json are now being passed down to mirrord.