Correctly handle sharding with an empty target list
diff --git a/buildkite/bazelci.py b/buildkite/bazelci.py
index 1c6aa43..45548db 100755
--- a/buildkite/bazelci.py
+++ b/buildkite/bazelci.py
@@ -1906,8 +1906,8 @@
             ),
         ],
         print_output=False,
-    )
-    return output.strip().split("\n")
+    ).strip()
+    return output.split("\n") if output else []
 
 
 def partition_targets(targets):