add more errors checkes
[teamcity/dotNetPackagesSupport.git] / nuget-server / src / jetbrains / buildServer / nuget / server / exec / ListPackagesCommandProcessor.java
index 57dd71c543974a119c138020d1c2b8e34c5b2649..01fc45413aedcb65de5ee13340b0e81a43796adb 100644 (file)
@@ -75,6 +75,9 @@ public class ListPackagesCommandProcessor implements NuGetOutputProcessor<Collec
     if (LOG.isDebugEnabled()) {\r
       LOG.debug("NuGet TeamCity.List command exited with " + exitCode);\r
     }\r
+    if (exitCode != 0) {\r
+      throw new RuntimeException("Failed to execute TeamCity.List command. Exit code was " + exitCode);\r
+    }\r
   }\r
 \r
   @NotNull\r