From 443231348dac5a86300b37bdbed4b1b0d0cdaaab Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 6 Dec 2013 06:37:29 -0500 Subject: [PATCH] Bug fixed in bin --- cmd/bin.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/bin.go b/cmd/bin.go index 1910824ba..bc9b0975b 100644 --- a/cmd/bin.go +++ b/cmd/bin.go @@ -78,11 +78,13 @@ func runBin(ctx *cli.Context) { // Parse package version. info := ctx.Args()[0] pkgPath := info - tp, ver := "", "" + node := doc.NewNode(pkgPath, pkgPath, doc.BRANCH, "", true) var err error if i := strings.Index(info, "@"); i > -1 { pkgPath = info[:i] - tp, ver = validPath(info[i+1:]) + node.ImportPath = pkgPath + node.DownloadURL = pkgPath + node.Type, node.Value = validPath(info[i+1:]) } // Check package name. @@ -90,13 +92,11 @@ func runBin(ctx *cli.Context) { pkgPath = doc.GetPkgFullPath(pkgPath) } - node := doc.NewNode(pkgPath, pkgPath, tp, ver, true) - // Get code. downloadPackages(ctx, []*doc.Node{node}) // Check if previous steps were successful. - repoPath := installRepoPath + "/" + pkgPath + versionSuffix(ver) + repoPath := installRepoPath + "/" + pkgPath + versionSuffix(node.Value) if !com.IsDir(repoPath) { log.Error("bin", "Cannot continue command:") log.Fatal("", "\tPrevious steps weren't successful")