mirror of
https://github.com/ipfs/kubo.git
synced 2025-08-06 19:44:01 +08:00
core/commands: Enable stdin arguments for 'add' and 'cat', resolves #542
This commit is contained in:
@ -37,7 +37,7 @@ remains to be implemented.
|
||||
},
|
||||
|
||||
Arguments: []cmds.Argument{
|
||||
cmds.FileArg("path", true, true, "The path to a file to be added to IPFS").EnableRecursive(),
|
||||
cmds.FileArg("path", true, true, "The path to a file to be added to IPFS").EnableRecursive().EnableStdin(),
|
||||
},
|
||||
Options: []cmds.Option{
|
||||
cmds.OptionRecursivePath, // a builtin option that allows recursive paths (-r, --recursive)
|
||||
|
@ -18,7 +18,7 @@ it contains.
|
||||
},
|
||||
|
||||
Arguments: []cmds.Argument{
|
||||
cmds.StringArg("ipfs-path", true, true, "The path to the IPFS object(s) to be outputted"),
|
||||
cmds.StringArg("ipfs-path", true, true, "The path to the IPFS object(s) to be outputted").EnableStdin(),
|
||||
},
|
||||
Run: func(req cmds.Request) (interface{}, error) {
|
||||
node, err := req.Context().GetNode()
|
||||
|
Reference in New Issue
Block a user