diff --git a/src/deploy/scope_managementgroup.ts b/src/deploy/scope_managementgroup.ts index f989d0a..a5a5f56 100644 --- a/src/deploy/scope_managementgroup.ts +++ b/src/deploy/scope_managementgroup.ts @@ -68,7 +68,7 @@ export async function DeployManagementGroupScope(azPath: string, region: string, core.info("Creating deployment...") var deploymentCode = await exec(`"${azPath}" deployment mg create ${azDeployParameters} -o json`, [], deployOptions); if (commandStdErr.trim().length !== 0) { - core.error(commandStdErr) + throw new Error(`Deployment process failed as some lines were written to stderr: ${commandStdErr}`) } else { if (deploymentCode != 0) { core.error("Deployment failed.") diff --git a/src/deploy/scope_resourcegroup.ts b/src/deploy/scope_resourcegroup.ts index 604e2d5..10419cf 100644 --- a/src/deploy/scope_resourcegroup.ts +++ b/src/deploy/scope_resourcegroup.ts @@ -70,7 +70,7 @@ export async function DeployResourceGroupScope(azPath: string, resourceGroupName core.info("Creating deployment...") var deploymentCode = await exec(`"${azPath}" deployment group create ${azDeployParameters} -o json`, [], deployOptions); if (commandStdErr.trim().length !== 0) { - core.error(commandStdErr) + throw new Error(`Deployment process failed as some lines were written to stderr: ${commandStdErr}`) } else { if (deploymentCode != 0) { core.error("Deployment failed.") diff --git a/src/deploy/scope_subscription.ts b/src/deploy/scope_subscription.ts index 9f07f58..eeffd19 100644 --- a/src/deploy/scope_subscription.ts +++ b/src/deploy/scope_subscription.ts @@ -68,7 +68,7 @@ export async function DeploySubscriptionScope(azPath: string, region: string, te core.info("Creating deployment...") var deploymentCode = await exec(`"${azPath}" deployment sub create ${azDeployParameters} -o json`, [], deployOptions); if (commandStdErr.trim().length !== 0) { - core.error(commandStdErr) + throw new Error(`Deployment process failed as some lines were written to stderr: ${commandStdErr}`) } else { if (deploymentCode != 0) { core.error("Deployment failed.")