mirror of
				https://github.com/taigrr/yq
				synced 2025-01-18 04:53:17 -08:00 
			
		
		
		
	Set STDOUT to default out when printing via cobra
This commit is contained in:
		
							parent
							
								
									eedbb0a99f
								
							
						
					
					
						commit
						4eaadf98d0
					
				| @ -22,6 +22,7 @@ func New() *cobra.Command { | |||||||
| 			return nil | 			return nil | ||||||
| 		}, | 		}, | ||||||
| 		PersistentPreRun: func(cmd *cobra.Command, args []string) { | 		PersistentPreRun: func(cmd *cobra.Command, args []string) { | ||||||
|  | 			cmd.SetOut(cmd.OutOrStdout()) | ||||||
| 			var format = logging.MustStringFormatter( | 			var format = logging.MustStringFormatter( | ||||||
| 				`%{color}%{time:15:04:05} %{shortfunc} [%{level:.4s}]%{color:reset} %{message}`, | 				`%{color}%{time:15:04:05} %{shortfunc} [%{level:.4s}]%{color:reset} %{message}`, | ||||||
| 			) | 			) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user