mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-22 12:51:19 +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:
@ -55,7 +55,7 @@ on raw ipfs blocks. It outputs the following to stdout:
|
||||
},
|
||||
|
||||
Arguments: []cmds.Argument{
|
||||
cmds.StringArg("key", true, false, "The base58 multihash of an existing block to get.").EnableStdin(),
|
||||
cmds.StringArg("key", true, false, "The base58 multihash of an existing block to get."),
|
||||
},
|
||||
Run: func(req cmds.Request, res cmds.Response) {
|
||||
b, err := getBlockForKey(req, req.Arguments()[0])
|
||||
@ -88,7 +88,7 @@ It outputs to stdout, and <key> is a base58 encoded multihash.
|
||||
},
|
||||
|
||||
Arguments: []cmds.Argument{
|
||||
cmds.StringArg("key", true, false, "The base58 multihash of an existing block to get.").EnableStdin(),
|
||||
cmds.StringArg("key", true, false, "The base58 multihash of an existing block to get."),
|
||||
},
|
||||
Run: func(req cmds.Request, res cmds.Response) {
|
||||
b, err := getBlockForKey(req, req.Arguments()[0])
|
||||
|
Reference in New Issue
Block a user