1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-07-01 02:30:39 +08:00

make executable name in command output stable

by setting os.Args[0] to "ipfs"

License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
This commit is contained in:
keks
2017-12-20 18:38:02 +01:00
committed by Jeromy
parent 8061117e0c
commit c2ffb8e73b

View File

@ -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 {