aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/command/clean.lux
diff options
context:
space:
mode:
authorEduardo Julian2020-12-03 02:09:57 -0400
committerEduardo Julian2020-12-03 02:09:57 -0400
commit0205e5146b50ab066d152fccda0fc8cef4eef852 (patch)
treeda2d89132da8f09344e26db78d0e43ca1095ee7f /stdlib/source/program/aedifex/command/clean.lux
parent28c724857d76afdc40b5b036f415cc151eb66263 (diff)
Detect duplicate files coming from dependencies.
Diffstat (limited to 'stdlib/source/program/aedifex/command/clean.lux')
-rw-r--r--stdlib/source/program/aedifex/command/clean.lux19
1 files changed, 12 insertions, 7 deletions
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)))