mirror of
https://github.com/johnkerl/miller.git
synced 2026-01-23 02:14:13 +00:00
Check -- terminator on --mfrom (#1098)
This commit is contained in:
parent
0aea51b6fe
commit
f131087713
5 changed files with 6 additions and 0 deletions
|
|
@ -2722,6 +2722,10 @@ var MiscFlagSection = FlagSection{
|
|||
options.FileNames = append(options.FileNames, args[*pargi])
|
||||
*pargi += 1
|
||||
}
|
||||
if *pargi >= argc {
|
||||
fmt.Fprintf(os.Stderr, "mlr: \"--mfrom\" must be terminated by \"--\".\n")
|
||||
os.Exit(1)
|
||||
}
|
||||
if args[*pargi] == "--" {
|
||||
*pargi += 1
|
||||
}
|
||||
|
|
|
|||
1
test/cases/cli-mfrom/0003/cmd
Normal file
1
test/cases/cli-mfrom/0003/cmd
Normal file
|
|
@ -0,0 +1 @@
|
|||
mlr --csv --mfrom test/input/s.csv test/input/t.csv cat
|
||||
1
test/cases/cli-mfrom/0003/experr
Normal file
1
test/cases/cli-mfrom/0003/experr
Normal file
|
|
@ -0,0 +1 @@
|
|||
mlr: "--mfrom" must be terminated by "--".
|
||||
0
test/cases/cli-mfrom/0003/expout
Normal file
0
test/cases/cli-mfrom/0003/expout
Normal file
0
test/cases/cli-mfrom/0003/should-fail
Normal file
0
test/cases/cli-mfrom/0003/should-fail
Normal file
Loading…
Add table
Add a link
Reference in a new issue