johanclasson / vso-agent-tasks

Build and Release Tasks for Visual Studio Online and Team Foundation Server
MIT License
20 stars 16 forks source link

Skip Variable Substitution #42

Closed vjgn closed 6 years ago

vjgn commented 6 years ago

Even when variable substitution is not configured, it appears this is still attempted. I end up with an error "variable XXX has no value defined". Even though my script has something matching the pattern of $XXX$, it should be ignored and executed, but this does not appear to be the case.

After reviewing the migration PowerShell code, I think we might have to call WithVariablesDisabled() if $VariableSubstitution set to $false. That way it is not attempted at all.

johanclasson commented 6 years ago

Looks like a great suggestion! I see you have already fixed it in a fork. Feel free to send a PR. I will perform some testing and then publish an updated version.

vjgn commented 6 years ago

Yes. I have fixed it in a fork and tested it successfully. I will send a PR shortly.

johanclasson commented 6 years ago

New version out now with your fix. Look for version 1.2.0. Thank you for your help!