Passing non existing environmental variable to executable weird behaviour
See original GitHub issueWhen setting defaultEnv
property with os_env
that doesn’t exist, the environment variable will still be created, with not resolved string value.
For example
"catch2TestExplorer.defaultEnv": {
"VAR_DOESNT_EXIST": "${os_env:VAR_DOESNT_EXIST}"
}
The literal resulting value passed to the executable would be VAR_DOESNT_EXIST
==
"${os_env:VAR_DOESNT_EXIST}"
.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
tasks.options.env` do not overwrite existing environment ...
However, if an environment variable is pre-existing, it will not be overwritten in the execution environment of the task. I am extremely ...
Read more >environment variables - strange behavior of 'echo' in 'env' bash
It interprets env as a command name and xxx=23 , echo , and $xxx as three arguments which will be passed to the...
Read more >CMake + Tests: Environment variables ignored
I have some tests in a CMake project that depend on a DLL to run. To ensure the DLL is found I change...
Read more >Docker-compose not seeing environment variables on the host
I figured it out, I'm posting this in case someone might need it. My problem was that the environment variables are not preserved...
Read more >Here's how you can actually use Node environment variables
Here's how you can actually use Node environment variables · Pass it in the terminal · Use a .env file · Working with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can see it is more logical in your case… But … considering
"PATH": "${os_env:PATH}:${os_env:EXTEND_PATH_WITH_THIS}"
"EXTENDED_VAR": "${os_env:SIMPLE_VAR} is extended with something"
.In these cases I cannot unset
PATH
. Just wanted to say it is not trivial…Note: new var is added
@{os_env_strict:...}
.