From 0205e5146b50ab066d152fccda0fc8cef4eef852 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 3 Dec 2020 02:09:57 -0400 Subject: Detect duplicate files coming from dependencies. --- stdlib/source/program/aedifex/command/clean.lux | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'stdlib/source/program/aedifex/command/clean.lux') diff --git a/stdlib/source/program/aedifex/command/clean.lux b/stdlib/source/program/aedifex/command/clean.lux index 618125a89..7f942fc00 100644 --- a/stdlib/source/program/aedifex/command/clean.lux +++ b/stdlib/source/program/aedifex/command/clean.lux @@ -9,7 +9,8 @@ [concurrency ["." promise (#+ Promise)]]] [world - ["." file (#+ Path File Directory)]]] + ["." file (#+ Path File Directory)] + ["." console (#+ Console)]]] ["." /// #_ [command (#+ Command)] ["#" profile] @@ -25,8 +26,14 @@ nodes)] (wrap []))) -(def: #export (do! fs profile) - (-> (file.System Promise) (Command Any)) +(def: #export success + "Success") + +(def: #export failure + "Failure: No 'target' defined for clean-up.") + +(def: #export (do! console fs profile) + (-> (Console Promise) (file.System Promise) (Command Any)) (case (get@ #///.target profile) (#.Some target) (do {! ///action.monad} @@ -39,9 +46,7 @@ (!.use (\ root directories) [])) _ (monad.map ! recur subs)] (!.use (\ root discard) [])))] - (exec (log! "No 'target' defined for clean-up.") - (wrap []))) + (console.write-line ..success console)) #.None - (exec (log! "No 'target' defined for clean-up.") - (\ ///action.monad wrap [])))) + (console.write-line ..failure console))) -- cgit v1.2.3