I am working on script where I want to take result from first script and run second script accordingly.
This is my first script -
$result = <command 1>
if($result)
{
< run command 2>
return $true
}
else {
return $false
}
Here is second script
if($return -eq $true)
{
<run Command 3>
}
else{
<run command 4>
}
I have 2 separate tasks in Azure Devops for performing these 2 scripts .
I am using Azure PowerShell task in my pipeline and output variable - return
Que - first script works good. Its returning true or false value but second script is not working. its just preforming else conditions whether return value from first script true or false. How can I make second script work according to true false result returned from first script