From 2b1bf67c866a775f42a06b8b2a8c256b5605f0f5 Mon Sep 17 00:00:00 2001 From: Jan Broer Date: Thu, 6 Aug 2015 01:11:22 +0200 Subject: [PATCH] Fixes runtime error when `ros env` is called without argument(s) --- cmd/control/env.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/control/env.go b/cmd/control/env.go index 9e4f9ec7..6b2fd266 100644 --- a/cmd/control/env.go +++ b/cmd/control/env.go @@ -18,6 +18,9 @@ func envAction(c *cli.Context) { } args := c.Args() + if len(args) == 0 { + return + } osEnv := os.Environ() envMap := make(map[string]string, len(cfg.Rancher.Environment)+len(osEnv))