]> granicus.if.org Git - graphviz/commit
Make parsing of vcvarsall.bat output more robust
authorMagnus Jacobsson <magnus.jacobsson@berotec.se>
Sun, 23 Aug 2020 08:25:50 +0000 (10:25 +0200)
committerMagnus Jacobsson <magnus.jacobsson@berotec.se>
Sun, 23 Aug 2020 16:05:03 +0000 (18:05 +0200)
commitc84c75542a61b0cf1aed441129a91e0ebc7ce8f0
treef826b29dcc3b71414181585183a7f11c1b469473
parent276ed5873b1dcab98a75dfbebf25f1f065efc569
Make parsing of vcvarsall.bat output more robust

Only consider variable names with alpanumeric characters, underscore
and parentheses. This avoids most problems when parsing output
containing multi-line variable values with arbitrary text.

In GitLab CI, one of the environment variables is CI_COMMIT_MESSAGE. In the commit immediately following this commit there is an URL containing an equal sign that caused the error below:

Set-Content : An object at the specified path
env:\https://docs.microsoft.com/en-us/visualstudio/ide/how-to-configure-projects-to-target-platforms?view does not
exist, or has been filtered by the -Include or -Exclude parameter.
At line:3 char:5
+     Set-Content "env:\$($matches[1])" $matches[2];
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (System.String[]:String[]) [Set-Content], Exception
    + FullyQualifiedErrorId : ItemNotFound,Microsoft.PowerShell.Commands.SetContentCommand
.gitlab-ci.yml