Skip to content

Commit

Permalink
fix: Fix the argument --all (#34)
Browse files Browse the repository at this point in the history
* fix: Fix the argument all

* Improve the compose for group1
  • Loading branch information
xmnlab committed Apr 7, 2023
1 parent 2c29304 commit 564fa69
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
9 changes: 8 additions & 1 deletion containers/tests/group1/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,15 @@ services:
command: python -m http.server

service3:
hostname: service2
hostname: service3
image: python:latest
ports:
- 18002:8000
command: python -m http.server

service4:
hostname: servicef
image: python:latest
ports:
- 18003:8000
command: python -m http.server
5 changes: 4 additions & 1 deletion containers_sugar/sugar.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,10 @@ def _load_service_names(self):
services = self.service_group['services']

if self.args.all:
self.service_names = []
self.service_names = [
v['name']
for v in self.service_group.get('services', {}).get('list')
]
elif self.args.services == '':
pass
elif self.args.services:
Expand Down

0 comments on commit 564fa69

Please sign in to comment.