diff --git a/core/commands/get.go b/core/commands/get.go index 27a052f1e..13b9bf445 100644 --- a/core/commands/get.go +++ b/core/commands/get.go @@ -119,11 +119,7 @@ may also specify the level of compression by specifying '-l=<1-9>'. return } - outPath, _ := req.Options["output"].(string) - if len(outPath) == 0 { - _, outPath = gopath.Split(req.Arguments[0]) - outPath = gopath.Clean(outPath) - } + outPath := getOutPath(req) cmplvl, err := getCompressOptions(req) if err != nil {