#1
|
|||
|
|||
PowerShell script gives object required error
I've created a powershell task and checked the script radio with this script:
Code:
$matches = Select-String %PROCFILES_FULLPATH% -Pattern '(?<!cfg)\.DEBUG' -CaseSensitive $matchCount = 0 if ($matches -is [system.array]) { $matchCount = $matches.Count } else { $matchCount = $matches.Matches.Count } if ($matchCount -gt 0) { "##teamcity[message text='Warning! " + $matchCount + " matches of non `cfg.` prefixed DEBUG statements were found! This could result in minified build errors' status='WARNING']" } Quote:
Code:
Major Minor Build Revision ----- ----- ----- -------- 2 0 -1 -1 Last edited by rnauman; 07-16-2013 at 12:59 PM. |
#2
|
|||
|
|||
Double up the square bracket characters.
http://www.kinook.com/VisBuildPro/Ma...ershelltab.htm |
#3
|
|||
|
|||
Ah, perfect. Thanks
|
Tags |
powershell |
|
|