Permalink
Browse files

fixing deployment script's check for an existing staging deployment

  • Loading branch information...
1 parent 72753c9 commit 1dd12b828d84251eecd23060f543adffa1000040 @half-ogre half-ogre committed Apr 30, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 Scripts/Deploy.ps1
View
@@ -82,8 +82,8 @@ $cscfgFile = join-path $packageLocation "NuGetGallery.cscfg"
"Checking for existing staging deployment on $serviceName"
$deployment = Get-Deployment -ServiceName $serviceName -Slot Staging -Certificate $certificate -SubscriptionId $subscriptionId
-if ($deployment -ne $null) {
- "Deleting existing staging deployment $deployment.Name on $serviceName"
+if ($deployment -ne $null -and $deployment.Name -ne $null) {
+ "Deleting existing staging deployment $($deployment.Name) on $serviceName"
$operationId = (remove-deployment -subscriptionId $subscriptionId -certificate $certificate -slot Staging -serviceName $serviceName ).operationId
await-operation($operationId)
}

0 comments on commit 1dd12b8

Please sign in to comment.