Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: docker compose ps parsing for version >= 2.21 #336

Merged
merged 5 commits into from
Oct 20, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use startswith
Co-authored-by: Adam Chidlow <achidlow@users.noreply.github.com>
  • Loading branch information
joe-p and achidlow authored Oct 20, 2023
commit 75e118079a92c39ef3f42be418c867a24ed9885e
2 changes: 1 addition & 1 deletion src/algokit/core/sandbox.py
Original file line number Diff line number Diff line change
@@ -120,7 +120,7 @@ def ps(self, service_name: str | None = None) -> list[dict[str, Any]]:
data = []
joe-p marked this conversation as resolved.
Show resolved Hide resolved

# `docker compose ps --format json` on version < 2.21.0 outputs a JSON arary
if run_results.output and run_results.output[0] == "[":
if run_results.output.startswith("["):
data = json.loads(run_results.output)
# `docker compose ps --format json` on version >= 2.21.0 outputs seperate JSON objects, each on a new line
else:
Loading