diff --git a/Kudu.Services/Deployment/PushDeploymentController.cs b/Kudu.Services/Deployment/PushDeploymentController.cs index 87a36eae..12b7c0cf 100644 --- a/Kudu.Services/Deployment/PushDeploymentController.cs +++ b/Kudu.Services/Deployment/PushDeploymentController.cs @@ -432,8 +432,8 @@ private string GetArticfactURLFromARMJSON(JObject requestObject) { try { - // ARM template should have properties field and a packageUri field inside the properties field. - string packageUri = requestObject.Value("properties").Value("packageUri"); + // ARM template should have properties field and a packageUri field inside the properties field. + string packageUri = requestObject.Value("properties") != null ? requestObject.Value("properties").Value("packageUri") : requestObject.Value("packageUri"); if (string.IsNullOrEmpty(packageUri)) { throw new ArgumentException("Invalid Url in the JSON request"); @@ -513,7 +513,7 @@ private async Task PushDeployAsync(ArtifactDeploymentInfo deploym FileSystemHelpers.RemoveUnixSymlink(nodeModulesSymlinkFile, TimeSpan.FromSeconds(5)); } } - catch(Exception) + catch (Exception) { // best effort } @@ -767,10 +767,10 @@ private void ExtractTriggers(IRepository repository, ArtifactDeploymentInfo zipD // takes 20 seconds to load. On my machine it takes 900 msec. using (var zip = ZipFile.OpenRead(Path.Combine(_environment.SitePackagesPath, zipDeploymentInfo.ArtifactFileName))) { - var entries = zip.Entries - // Only select host.json, proxies.json, or function.json that are from top level directories only - // Tested with a zip containing 120k files, and this took 90 msec - // on my machine. + var entries = zip.Entries + // Only select host.json, proxies.json, or function.json that are from top level directories only + // Tested with a zip containing 120k files, and this took 90 msec + // on my machine. .Where(e => e.FullName.Equals(Constants.FunctionsHostConfigFile, StringComparison.OrdinalIgnoreCase) || e.FullName.Equals(Constants.ProxyConfigFile, StringComparison.OrdinalIgnoreCase) ||