Summary
Handle syntax etc. errors in compose
Problem statement
In edit compose there is a check if stack is running
running=$("$AGB_LIBDIR/run-compose" ps --status running --quiet 2>/dev/null) || true
running will also be empty if there are syntax etc. errors in compose files.
The problems are printed to stderr.
So if you edit the file and make a mistake you will see
16:04:31 [INFO] Compose file was modified.
even if the stack is actually running at that point.
Proposed change
It would be nice if the code detected the errors and warned about them.
I'm not sure how reliably this can be done though (does stderr output always mean a syntax etc. error? probbably not).
Maybe just run docker compose config after edits - if it fails I'd assume there are errors in the compose files
Alternatives considered
No response
Scope
Small targeted improvement
Roadmap alignment
This is a simple QoL improvement
Willingness to implement
I can't commit as much time as I'd like to this project ATM :(
Checklist
Summary
Handle syntax etc. errors in compose
Problem statement
In
edit composethere is a check if stack is runningrunningwill also be empty if there are syntax etc. errors in compose files.The problems are printed to stderr.
So if you edit the file and make a mistake you will see
even if the stack is actually running at that point.
Proposed change
It would be nice if the code detected the errors and warned about them.
I'm not sure how reliably this can be done though (does stderr output always mean a syntax etc. error? probbably not).
Maybe just run
docker compose configafter edits - if it fails I'd assume there are errors in the compose filesAlternatives considered
No response
Scope
Small targeted improvement
Roadmap alignment
This is a simple QoL improvement
Willingness to implement
I can't commit as much time as I'd like to this project ATM :(
Checklist