提交 78d36230 作者: Matt Bell

commands/cli: When parsing stdin as string argument, split lines into separate tokens

上级 b6670da5
......@@ -260,7 +260,8 @@ func appendStdinAsString(args []string, stdin *os.File) ([]string, *os.File, err
return nil, nil, err
}
return append(args, buf.String()), nil, nil
input := strings.TrimSpace(buf.String())
return append(args, strings.Split(input, "\n")...), nil, nil
}
func appendFile(args []cmds.File, inputs []string, argDef *cmds.Argument, recursive bool) ([]cmds.File, []string, error) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论