move command variable substitution to execution
This is needed as commands that need to be run need to have generator settings available before running to avoid inconsistencies with environment variables passed to the actually ran program and variables used in substitution. Fixes #2192 Fixes pre/postGenerateCommands inconsistently using dub environments (execution was substituted including buildEnvironments, but shell cmd did not get the build variables for substitution) - now both get the build variables. Solved by removing code duplication. (env building) This commit changes the behavior of `dub describe` so that describing commands settings no longer substitutes variables. Before, known variables would have been replaced in the output and on unknown variables `dub describe` would fail with an error `Target 'x' doesn't exist` Now exposes some previously private project.d processVars functions |
---|
|
changelog/command-variables.dd 0 → 100644 |
---|
source/dub/description.d |
---|
source/dub/generators/build.d |
---|
source/dub/generators/generator.d |
---|
source/dub/project.d |
---|
test/issue2192-environment-variables.sh 0 → 100755 |
---|
test/issue2192-environment-variables/.no_run 0 → 100644 |
---|
test/issue2192-environment-variables/dub.sdl 0 → 100644 |
---|
test/issue2192-environment-variables/source/lib.d 0 → 100644 |
---|