File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4747 plan (parse-result :plan )]
4848 (if parse-errors
4949 (errors/print-errors parse-errors (errors/exit-status-codes :parse-error ))
50- (let [serialize-empty-inbox (plan_parser/serialize-empty-inbox? plan-string )
51- new-plan (run-commands plan file-path arguments )
52- new-plan-string (plan_serializer/serialize
50+ (let [{:plan new-plan :errors run-errors } (run-commands plan file-path arguments )]
51+ (if (empty? run-errors )
52+ (let [serialize-empty-inbox (plan_parser/serialize-empty-inbox? plan-string )
53+ new-plan-string (plan_serializer/serialize
5354 new-plan
5455 {:serialize-empty-inbox serialize-empty-inbox })]
55- (file_repository/save new-plan-string file-path ))))))
56+ (file_repository/save new-plan-string file-path ))
57+ (errors/print-errors run-errors (errors/exit-status-codes :command-error ))))))))
5658
5759(defn- run-with-arguments [arguments ]
5860 (def file-path (arguments :default ))
Original file line number Diff line number Diff line change 88 {:error 1
99 :plan-path-missing 2
1010 :file-error 3
11- :parse-error 4 })
11+ :parse-error 4
12+ :command-error 5 })
1213
1314(defn format-command-errors [command errors ]
1415 (map (fn [error ] (string command " " (string/ascii-lower error ) " ." )) errors ))
You can’t perform that action at this time.
0 commit comments