less obscure error when the journal file path contains a tilde
This commit is contained in:
		
							parent
							
								
									48460b0130
								
							
						
					
					
						commit
						13e0757670
					
				@ -426,10 +426,10 @@ defaultBalanceFormatString = [
 | 
				
			|||||||
journalFilePathFromOpts :: CliOpts -> IO String
 | 
					journalFilePathFromOpts :: CliOpts -> IO String
 | 
				
			||||||
journalFilePathFromOpts opts = do
 | 
					journalFilePathFromOpts opts = do
 | 
				
			||||||
  f <- myJournalPath
 | 
					  f <- myJournalPath
 | 
				
			||||||
  return $ errorIfContainsTilde $ fromMaybe f $ file_ opts
 | 
					  let f' = fromMaybe f $ file_ opts
 | 
				
			||||||
 | 
					  if '~' `elem` f'
 | 
				
			||||||
errorIfContainsTilde s |'~' `elem` s = error' "unsupported literal ~ found in environment variable, please adjust"
 | 
					   then error' $ printf "~ in the journal file path is not supported, please adjust (%s)" f'
 | 
				
			||||||
                       | otherwise   = s
 | 
					   else return f'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
aliasesFromOpts :: CliOpts -> [(AccountName,AccountName)]
 | 
					aliasesFromOpts :: CliOpts -> [(AccountName,AccountName)]
 | 
				
			||||||
aliasesFromOpts = map parseAlias . alias_
 | 
					aliasesFromOpts = map parseAlias . alias_
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user