Skip to content

Commit

Permalink
Merge pull request #6541 from ipfs/fix/external-command-install
Browse files Browse the repository at this point in the history
feat: add install instructions for external commands
  • Loading branch information
Stebalien authored Jul 26, 2019
2 parents 8417818 + c312cff commit 1fdff60
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions core/commands/external.go
Original file line number Diff line number Diff line change
Expand Up @@ -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."),
Expand All @@ -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)
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/commands/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 1fdff60

Please sign in to comment.