aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2020-01-29 19:48:58 +0000
committerJussi Pakkanen <jpakkane@gmail.com>2020-02-04 21:07:38 +0200
commit8d68fa22e0508337dd449a7dc66d70d9d15f4f8e (patch)
tree1656c6ff7b2ad520f4c7f5de3a5f801063153b7e
parent7097d8a021a2fddb42b9b8e0e1111c6cb6f3ff8f (diff)
downloadmeson-8d68fa22e0508337dd449a7dc66d70d9d15f4f8e.zip
meson-8d68fa22e0508337dd449a7dc66d70d9d15f4f8e.tar.gz
meson-8d68fa22e0508337dd449a7dc66d70d9d15f4f8e.tar.bz2
Don't fail in setup on azure when commit message contains an equals sign
The kludgy method we use to get env vars from vcvarsall.bat into our environment doesn't correctly handle env var values which contain newlines. The BUILD_SOURCEVERSIONMESSAGE environment variable contains the entirety of the commit message. If a line containing an equals sign appears in the commit message, we could have problems. Unset that environment variable to workaround this problem.
-rw-r--r--ci/azure-steps.yml4
1 files changed, 4 insertions, 0 deletions
diff --git a/ci/azure-steps.yml b/ci/azure-steps.yml
index ef31208..66a7eed 100644
--- a/ci/azure-steps.yml
+++ b/ci/azure-steps.yml
@@ -102,6 +102,10 @@ steps:
$vcvars = "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat"
}
+ ## A multiline commit message containing "=" can interact badly with this
+ ## hack to extract the environment from vcvarsall.bat
+ Remove-Item env:BUILD_SOURCEVERSIONMESSAGE
+
## ask cmd.exe to output the environment table after the batch file completes
$tempFile = [IO.Path]::GetTempFileName()
cmd /c " `"$vcvars`" $env:arch && set > `"$tempFile`" "