Skip to content

Commit d528f9f

Browse files
committed
Regardless of dependencies, fig up only attaches to what you specify
Without this, if you go: $ fig up -d db $ fig up web you'll get output for both db and web, and Ctrl-C will kill them both. Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
1 parent 99d7a47 commit d528f9f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

fig/cli/main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,12 +322,14 @@ def up(self, options):
322322
recreate = not options['--no-recreate']
323323
service_names = options['SERVICE']
324324

325-
to_attach = self.project.up(
325+
self.project.up(
326326
service_names=service_names,
327327
start_links=start_links,
328328
recreate=recreate
329329
)
330330

331+
to_attach = [c for s in self.project.get_services(service_names) for c in s.containers()]
332+
331333
if not detached:
332334
print("Attaching to", list_containers(to_attach))
333335
log_printer = LogPrinter(to_attach, attach_params={"logs": True})

0 commit comments

Comments
 (0)