;check: fixes
This commit is contained in:
		
							parent
							
								
									de56d09024
								
							
						
					
					
						commit
						b47d582583
					
				| @ -455,7 +455,7 @@ data Journal = Journal { | ||||
|   ,jparsetimeclockentries :: [TimeclockEntry]                       -- ^ timeclock sessions which have not been clocked out | ||||
|   ,jincludefilestack      :: [FilePath] | ||||
|   -- principal data | ||||
|   ,jdeclaredpayees        :: [(Payee,PayeeDeclarationInfo)]         -- ^ Accounts declared by account directives, in parse order (after journal finalisation) | ||||
|   ,jdeclaredpayees        :: [(Payee,PayeeDeclarationInfo)]         -- ^ Payees declared by payee directives, in parse order (after journal finalisation) | ||||
|   ,jdeclaredaccounts      :: [(AccountName,AccountDeclarationInfo)] -- ^ Accounts declared by account directives, in parse order (after journal finalisation) | ||||
|   ,jdeclaredaccounttypes  :: M.Map AccountType [AccountName]        -- ^ Accounts whose type has been declared in account directives (usually 5 top-level accounts) | ||||
|   ,jglobalcommoditystyles :: M.Map CommoditySymbol AmountStyle      -- ^ per-commodity display styles declared globally, eg by command line option or import command | ||||
|  | ||||
| @ -18,7 +18,7 @@ import Data.Either (partitionEithers) | ||||
| import Data.Char (toUpper) | ||||
| import Safe (readMay) | ||||
| import Control.Monad (forM_) | ||||
| import System.IO (stderr, hPutStr) | ||||
| import System.IO (stderr, hPutStrLn) | ||||
| import System.Exit (exitFailure) | ||||
| 
 | ||||
| checkmode :: Mode RawOpts | ||||
| @ -79,7 +79,7 @@ runCheck copts@CliOpts{rawopts_} j (check,args) = | ||||
|     Payees          -> | ||||
|       case journalCheckPayeesDeclared j of | ||||
|         Right () -> return () | ||||
|         Left err -> hPutStr stderr err >> exitFailure | ||||
|         Left err -> hPutStrLn stderr err >> exitFailure | ||||
|   where | ||||
|     -- Hack: append the provided args to the raw opts, | ||||
|     -- in case the check can use them (like checkdates --unique).  | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user