From c312cfff27c9162b1486e2c7e3cbfdfc6273c000 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Fri, 26 Jul 2019 12:37:33 -0700 Subject: [PATCH] feat: add install instructions for external commands Issue reported on IRC. --- core/commands/external.go | 4 ++-- core/commands/root.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/commands/external.go b/core/commands/external.go index b2fde2fe1c9..37105c31e0b 100644 --- a/core/commands/external.go +++ b/core/commands/external.go @@ -11,7 +11,7 @@ import ( cmds "github.com/ipfs/go-ipfs-cmds" ) -func ExternalBinary() *cmds.Command { +func ExternalBinary(instructions string) *cmds.Command { return &cmds.Command{ Arguments: []cmds.Argument{ cmds.StringArg("args", false, true, "Arguments for subcommand."), @@ -27,7 +27,7 @@ func ExternalBinary() *cmds.Command { buf := new(bytes.Buffer) fmt.Fprintf(buf, "%s is an 'external' command.\n", binname) fmt.Fprintf(buf, "It does not currently appear to be installed.\n") - fmt.Fprintf(buf, "Please refer to the ipfs documentation for instructions.\n") + fmt.Fprintf(buf, "%s\n", instructions) return res.Emit(buf) } } diff --git a/core/commands/root.go b/core/commands/root.go index 1a4cd375708..752cfd4e3f3 100644 --- a/core/commands/root.go +++ b/core/commands/root.go @@ -144,7 +144,7 @@ var rootSubcommands = map[string]*cmds.Command{ "swarm": SwarmCmd, "tar": TarCmd, "file": unixfs.UnixFSCmd, - "update": ExternalBinary(), + "update": ExternalBinary("Please see https://git.io/fjylH for installation instructions."), "urlstore": urlStoreCmd, "version": VersionCmd, "shutdown": daemonShutdownCmd,