mirror of
				https://github.com/taigrr/yq
				synced 2025-01-18 04:53:17 -08:00 
			
		
		
		
	Error when passing files and using null-input flag
This commit is contained in:
		
							parent
							
								
									316e0d4d5a
								
							
						
					
					
						commit
						7fa2b20b48
					
				| @ -59,6 +59,10 @@ func evaluateAll(cmd *cobra.Command, args []string) error { | ||||
| 		defer func() { writeInPlaceHandler.FinishWriteInPlace(completedSuccessfully) }() | ||||
| 	} | ||||
| 
 | ||||
| 	if nullInput && len(args) > 1 { | ||||
| 		return errors.New("Cannot pass files in when using null-input flag") | ||||
| 	} | ||||
| 
 | ||||
| 	printer := yqlib.NewPrinter(out, outputToJSON, unwrapScalar, colorsEnabled, indent, !noDocSeparators) | ||||
| 
 | ||||
| 	allAtOnceEvaluator := yqlib.NewAllAtOnceEvaluator() | ||||
|  | ||||
| @ -83,6 +83,10 @@ func evaluateSequence(cmd *cobra.Command, args []string) error { | ||||
| 
 | ||||
| 	streamEvaluator := yqlib.NewStreamEvaluator() | ||||
| 
 | ||||
| 	if nullInput && len(args) > 1 { | ||||
| 		return errors.New("Cannot pass files in when using null-input flag") | ||||
| 	} | ||||
| 
 | ||||
| 	switch len(args) { | ||||
| 	case 0: | ||||
| 		if pipingStdIn { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user