1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-08-06 11:31:54 +08:00

commands: remove EnableStdin support for StringArg

With verbose flag:
* remove EnableStdin() flags on all StringArg,

* remove all unneeded parsing code for StringArg, and print an
* informative message if `ipfs` begins reading from a CharDevice,

* remove broken go tests for EnableStdin cli parsing, and add some
* trivial test cases for reading FileArg from stdin,

* add a panic to prevent EnableStdin from being set on
* StringArg in the future.

Resolves: #2877, #2870
License: MIT
Signed-off-by: Thomas Gardner <tmg@fastmail.com>
This commit is contained in:
Thomas Gardner
2016-06-23 22:35:41 +10:00
parent 2a4bbb712f
commit ddc8d0c60c
23 changed files with 82 additions and 143 deletions

View File

@ -56,7 +56,7 @@ Resolve the value of an IPFS DAG path:
},
Arguments: []cmds.Argument{
cmds.StringArg("name", true, false, "The name to resolve.").EnableStdin(),
cmds.StringArg("name", true, false, "The name to resolve."),
},
Options: []cmds.Option{
cmds.BoolOption("recursive", "r", "Resolve until the result is an IPFS name.").Default(false),