$command1 = 'git shortlog branch..branch1 --oneline --pretty="%an committed %h %s"' $A=iex $command1 Write-Host "Starting" Write-Host "testing " foreach($i in $A) {$pos = $i.IndexOf(":") $leftPart = $i.Substring(0, $pos) $rightPart = $i.Substring($pos+1) $output += $rightPart } $output Write-Host "SEPERATED" $c=$rightPart|Select-Object -Unique $c
Exception calling "Substring" with "2" argument(s): "Length cannot be less than zero. Parameter name: length" At line:10 char:1 + $leftPart = $i.Substring(0, $pos) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : ArgumentOutOfRangeException
foreach($i in $A)
$pos
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)