mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-17 16:38:54 +00:00
Fix print within begin{}/end{} (#1795)
* codemod per se * unit-test coverage * lint
This commit is contained in:
parent
100166532c
commit
34bc8a1c3d
4 changed files with 5 additions and 1 deletions
|
|
@ -70,8 +70,9 @@ func channelWriterHandleBatch(
|
|||
|
||||
// XXX more
|
||||
// XXX also make sure this results in exit 1 & goroutine cleanup
|
||||
if writerOptions.FailOnDataError {
|
||||
if writerOptions.FailOnDataError && record != nil {
|
||||
ok := true
|
||||
fmt.Printf("AAA %#v", record)
|
||||
for pe := record.Head; pe != nil; pe = pe.Next {
|
||||
if pe.Value.IsError() {
|
||||
context := recordAndContext.Context
|
||||
|
|
|
|||
1
test/cases/dsl-begin-end/0010/cmd
Normal file
1
test/cases/dsl-begin-end/0010/cmd
Normal file
|
|
@ -0,0 +1 @@
|
|||
mlr --from test/input/s.dkvp put -q 'begin{print 8}; end{print 9}'
|
||||
0
test/cases/dsl-begin-end/0010/experr
Normal file
0
test/cases/dsl-begin-end/0010/experr
Normal file
2
test/cases/dsl-begin-end/0010/expout
Normal file
2
test/cases/dsl-begin-end/0010/expout
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
8
|
||||
9
|
||||
Loading…
Add table
Add a link
Reference in a new issue