Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add install instructions for external commands #6541

Merged
merged 1 commit into from
Jul 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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