From c2ffb8e73b12769b9b99d0d5c8e3cc5bfafd022f Mon Sep 17 00:00:00 2001 From: keks Date: Wed, 20 Dec 2017 18:38:02 +0100 Subject: [PATCH] make executable name in command output stable by setting os.Args[0] to "ipfs" License: MIT Signed-off-by: keks --- cmd/ipfs/main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/ipfs/main.go b/cmd/ipfs/main.go index c1bbcb6ed..b3261589f 100644 --- a/cmd/ipfs/main.go +++ b/cmd/ipfs/main.go @@ -101,6 +101,10 @@ func mainRet() int { } } + // output depends on excecutable name passed in os.Args + // so we need to make sure it's stable + os.Args[0] = "ipfs" + buildEnv := func(ctx context.Context, req *cmds.Request) (interface{}, error) { repoPath, err := getRepoPath(req) if err != nil {