Skip to content

Commit

Permalink
Show a user-friendly error for interactive exec sesions (#4461)
Browse files Browse the repository at this point in the history
  • Loading branch information
caglar10ur authored Mar 29, 2017
1 parent 8883c8f commit 796775e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/apiservers/engine/backends/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@ func (c *Container) TaskInspect(cid, cname, eid string) (*models.TaskInspectResp
func (c *Container) ContainerExecCreate(name string, config *types.ExecConfig) (string, error) {
defer trace.End(trace.Begin(name))

if !config.Detach {
return "", fmt.Errorf("%s only supports detached exec commands at this time", ProductName())
}

// Look up the container name in the metadata cache to get long ID
vc := cache.ContainerCache().GetContainer(name)
if vc == nil {
Expand Down

0 comments on commit 796775e

Please sign in to comment.