mirror of
https://github.com/ipfs/kubo.git
synced 2025-07-03 04:37:30 +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:
@ -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) {
|
buildEnv := func(ctx context.Context, req *cmds.Request) (interface{}, error) {
|
||||||
repoPath, err := getRepoPath(req)
|
repoPath, err := getRepoPath(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Reference in New Issue
Block a user