From 42748a2c4b1307c012c5a2c2cc5bbbe5fd2bb1ba Mon Sep 17 00:00:00 2001 From: Josh Curl Date: Thu, 18 Aug 2016 15:03:59 -0700 Subject: [PATCH] Fix duplicate volumes_from when switching consoles --- cmd/switchconsole/switch_console.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/switchconsole/switch_console.go b/cmd/switchconsole/switch_console.go index b3681bf2..38362fca 100644 --- a/cmd/switchconsole/switch_console.go +++ b/cmd/switchconsole/switch_console.go @@ -4,6 +4,7 @@ import ( "os" log "github.com/Sirupsen/logrus" + composeConfig "github.com/docker/libcompose/config" "github.com/docker/libcompose/project/options" "github.com/rancher/os/compose" "github.com/rancher/os/config" @@ -24,6 +25,8 @@ func Main() { } if newConsole != "default" { + project.ServiceConfigs.Add("console", &composeConfig.ServiceConfig{}) + if err = compose.LoadService(project, cfg, true, newConsole); err != nil { log.Fatal(err) }