File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010(import ./plan/parser :as plan_parser )
1111(import ./plan/serializer :as plan_serializer )
1212
13- (defn- print-errors [errors exit-status-code ]
14- (each error errors (print (string error " ." )))
15- (os/exit exit-status-code ))
16-
1713# Keep commands sorted alphabetically.
1814(def argparse-params
1915 [" A command line utility for planning your days"
4440 (def load-file-result (file_repository/load file-path ))
4541 (def errors (load-file-result :errors ))
4642 (if errors
47- (print-errors errors (errors/exit-status-codes :file-error ))
43+ (errors/ print-errors errors (errors/exit-status-codes :file-error ))
4844 (let [plan-string (load-file-result :text )
4945 parse-result (plan_parser/parse plan-string )
5046 parse-errors (parse-result :errors )
5147 plan (parse-result :plan )]
5248 (if parse-errors
53- (print-errors parse-errors (errors/exit-status-codes :parse-error ))
49+ (errors/ print-errors parse-errors (errors/exit-status-codes :parse-error ))
5450 (let [serialize-empty-inbox (plan_parser/serialize-empty-inbox? plan-string )
5551 new-plan (run-commands plan file-path arguments )
5652 new-plan-string (plan_serializer/serialize
Original file line number Diff line number Diff line change 99 :plan-path-missing 2
1010 :file-error 3
1111 :parse-error 4 })
12+
13+ (defn print-errors [errors exit-status-code ]
14+ (each error errors (print (string error " ." )))
15+ (os/exit exit-status-code ))
You can’t perform that action at this time.
0 commit comments